Find files with PowerShell

I struggle every day with the Search capabilities of Windows 7. I know there is no way I am the only person that has this problem. Found this great way to do a search of a location (local or UNC share) using PowerShell. This command will search the provided location recursively for all files matching a given criteria will output the list to a text file. I was wanting a full list of all music files in my iTunes library and used this gather that list. I will then able to clean-up as needed and was pleasantly surprised by some of the music that I have that was ‘forgotten’.

Get-ChildItem “file_location” -Recurse -Include “*.mp*”,”*.m4*” | foreach-object {$_.Fullname} | Out-File c:music.txt –width 1024

Have fun with this one. I know it has made my life easier.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: