Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Find  all  Text  Files  in  a  Folder  and  its  Subfolders  

 Content of Find all Text Files in a Folder and its Subfolders.vbs
MD5 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 ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a