Script to scan for certain file types

October 6, 2011 at 03:14:07
Specs: Windows XP

I'm looking for a powershell or vbs script which will scan a folder or drive for certain file types that I want it too.

I.e. scan F drive for .exe files or .txt files and then it put the results into a text file with full location patch and file name i.e. F:\Test\ABC\scan.exe

Look forward to your replies.

Kind Regards,

See More: Script to scan for certain file types

Report •

October 6, 2011 at 06:42:56
Batch would be the easiest:
dir f:\*.exe f:\*.txt /s >> "a text file"

Powershell would be next:
Get-ChildItem f:\ -include @("*.txt", "*.exe") -Recurse | foreach { $_.FullName >> "a text file" }

VBScript would be the hardest, and I'm not going to bother writing that up.

How To Ask Questions The Smart Way

Report •
Related Solutions

Ask Question