Community Page
- www.tech-recipes.com/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- that still wont work and i got no idea about registery could use help
- Thanx for help
- Thought I would have to get out my regestry editor, should have checked the settings first XD.
- thanks! it's very helpful.
- What printer goes with Vista 64 bit?
Tech-Recipes
Cookbook of Tech TutorialsPowerShell: Quick Way to Check for a File Type on a Drive or Directory | Windows | Tech-Recipes
Started by qdideas · 9 months ago
2 years ago
btw, thanks for a great blog.
2 years ago
Set objFSO = CreateObject("Scripting.FilesyStemObject")
myFolder="c:"
Set objFolder = objFSO.GetFolder(myFolder)
GoSubFolders objFolder
Sub GoSubFolders (objDIR)
If objDIR <> "System Volume Information" Then
MainSub objDIR
For Each eFolder in objDIR.SubFolders
GoSubFolders eFolder
Next
End If
End Sub
Sub MainSub (objDIR)
For Each efile in objDIR.Files
WScript.Echo "File ", eFile, "is a ", eFile.Type
Next
End Sub
save it as .vbs extension, type cscript myscript.vbs