3.14. Finding Large Files and Folders on a Volume
You want to find files or folders t hat exceed a certain size on a volume.
Using a graphical user interface
From the Start menu, select Search.
If you are presented with the options for what to search on, click All files and folders.
Click on What size is it?
Select the radio button beside Specify size and enter the size you want to search.
Select additional criteria if necessary and click Search.
Using a command-line interface
The following command finds folders that are greater than 100 MB in size on the D: drive:
> diruse /s /m /q:100 /d d:
/s option causes
subdirectories to be searched, the
/m option displays disk usage in
causes folders that are greater than 100 MB to be marked, and the
/d option displays only folders
that exceed the threshold specified by
Use the diskuse command to find files over a certain size. The following command displays files over 100 MB in size on the D: drive:
> diskuse D: /x:104857600 /v /s
causes files over 104,857,600 bytes to be displayed and is valid
only if you include the
/s option means
subdirectories from the specified path (in this case, the D: drive)
' This code finds all files over a certain size. ' ------ SCRIPT CONFIGURATION ------ strComputer = "
<ServerName>" intSizeBytes = 1024 * 1024 * 500 ' = 500 MB ' ------ END CONFIGURATION --------- set objWMI = GetObject("winmgmts:\\" ...