Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Find all Text Files in a Folder and its SubfoldersContent of Find all Text Files in a Folder and its Subfolders.vbsMD5 Hash: 8DD8C0F10FC5FB3D93EBF155FDC9C0C0 |
||
Dim ofso : Set ofso = Createobject("Scripting.FileSystemObject")
Dim oWshShell : Set oWshShell = WScript.CreateObject("WSCript.shell") SearchPath = "C:\DATA" GetFiles SearchPath '''--------------------- Main Sub Sub GetFiles(SearchPath) Dim sPath, SearchFiles Set sPath = ofso.Getfolder(SearchPath) Set SearchFiles = sPath.Files For Each Folder in sPath.Subfolders GetFiles(Folder) Next For Each File in SearchFiles If Ucase(Right(File.Name,4)) = ".TXT" then msgbox File End if Next End Sub | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |