Hi, 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,
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.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |