May 21, 2007 - General, Scripting    No Comments

How can I quickly check whether a folder contains a certain type of file?

You can pass the test-path cmdlet a wildcard expression to see whether any matching file exists. For example, to see whether a folder has any MP3 files, you can use

test-path d:temp*.mp3

Related Posts Plugin for WordPress, Blogger...

Got anything to say? Go ahead and leave a comment!