Script to check folder size windows




















Improve this answer. Pavel P I did some hacky testing and it does indeed seem this is much much faster, going to update my question with the code which is painful because it is basically butchered version of my code that had to do a bunch of other things — StanM.

Brilliant solution and ultra fast! Check with where robocopy what version you use! Even looks language settings independent. May be if you find a way to exclude findstr i think its possible it will be faster. The findstr is used to discard all the dir lines that does not include size information. But all the intermediate sizes one for each folder are not necessary. It is necessary to reduce the volume of data to process from command output.

In the indicated scenario, the only way to remove the findstr is to use a temporary file. For cases like this the pipe is a faster solution. This feature makes me very happy :- Thanks for demonstrating. FileSystemObject" ; WScript. Echo fso. GetFolder '. GetFolder WScript. Unnamed 0. Size ; The only limitation is you must have access to all folders and files? You could use Scripting. FileSystemObject even in a powershell script where both powerscript and cscript are present on Windows PC out of the box.

See blogs. OpenTextFile "size. I don't want to muck around changing a lot of folders en masse — StanM. I think that looping over each line of output of the compact or dir command is inefficient and can be avoided by filtering the interim result: echo off REM dirsize. Icemanind Icemanind Add '-Force' to GCI to include hidden files. To get the quota information, use the following command this can be executed from your workstation or any other server. Substring Split " ".

If your settings use a comma, append the following to this line:. Replace ". Replace ",",". Idera uses cookies to improve user experience. By using our community you consent to all cookies in accordance with our Cookie policy.

Site Search User. Ask the Experts. More Cancel. Replies 14 replies Subscribers 10 subscribers Views views Users 0 members are here. Share More Cancel. If you have the script to do this automatically it will be better. Previous script worked, but this just hangs in PS and nothing happens…. I like the third party tool: Directory Report It can filter by file types, modification date, size and owner It can save its output to many file types including directly to MS-Excel.

Notify me of followup comments via e-mail. You can also subscribe without commenting. Leave this field empty. Home About. In one of the previous articles, we showed how to use the Get-ChildItem cmdlet in PowerShell to find the largest files on disk.

Related Reading. Forwarding Emails to an External Address in Microsoft January 13, January 10, Bob March 23, - pm Thanks for your addition!

Richard August 6, - pm Well written article, thanks! Thank you. One request. How can I export the final result to an. Michael Freitas October 6, - pm I did it manually, selected all the lines, copied and pasted it into excel.



0コメント

  • 1000 / 1000