September 24th, 2014

PowerTip: Use PowerShell and Graphical Tool to View Files

Doctor Scripto
Scripter

Summary: Use Windows PowerShell and a graphical tool to view large files.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily see what files in a folder are the largest so I can clean up my file system?

 Hey, Scripting Guy! Answer Use the Get-ChildItem cmdlet to return the contents of a folder, select the name and length of the files, then
            pipe the results to the Out-GridView cmdlet for easy viewing. This example uses a folder named C:\fso:

Get-ChildItem c:\fso | Select name, length | Out-GridView 


Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback