-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
- Zune 30 Gig Deaths on 12/31/08
- Outlook 2007: Make a Backup Copy of Your Signatures
- AOL Instant Messenger (AIM) Hyperlink Command Codes | Instant messaging | Tech-Recipes
- Napster/Winamp hack to get unprotected free music | Windows | Tech-Recipes
- Make XP look like Windows Vista / Longhorn for free! | Microsoft Vista | Tech-Recipes
-
Recent Comments
- I like this new version of outlook it is useful and nice look.
- More to the poit how do I get the send link button to send a gmail message?
- informative, explained in an excellent way.
- I am also thankful and will stick with the 32 bit version on my new laptop, though it also comes with an XP Professional downgrade that I'm expecting to take advantage of. how is it that with...
- i need elevation to complete
Jump to original thread »
PowerShell: Quick Way to Check for a File Type on a Drive or Directory | Windows | Tech-Recipes
Started by qdideas · 3 months ago
1 year ago
btw, thanks for a great blog.
1 year 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