skip to main | skip to sidebar

Ted's Hello World

Thursday, March 12, 2009

Recursively Iterate through a folder

Set fs = WScript.CreateObject ("Scripting.FileSystemObject")

Sub ShowSubFolders(Folder)
For Each Subfolder In Folder.SubFolders
Set files = SubFolder.Files
For Each file In files
WScript.Echo file.Name, file.Size
Next
ShowSubFolders Subfolder
Next
End Sub

ShowSubFolders fs.GetFolder("C:\your\path\here")

Posted by Ted Unnikumaran at 12:45 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2011 (1)
    • ►  January (1)
  • ►  2010 (42)
    • ►  November (4)
    • ►  October (1)
    • ►  June (10)
    • ►  May (2)
    • ►  April (5)
    • ►  March (14)
    • ►  February (5)
    • ►  January (1)
  • ▼  2009 (56)
    • ►  December (1)
    • ►  November (4)
    • ►  September (1)
    • ►  August (4)
    • ►  July (2)
    • ►  June (9)
    • ►  May (7)
    • ►  April (5)
    • ▼  March (7)
      • Save a byte array to a file
      • how to close a form when it loses focus vb.net
      • Read a comma delimited file in VB.NET
      • Recursively Iterate through a folder
      • Check for a text in a string
      • Visual Basic 2005: A Developer's Notebook/Windows ...
      • DoEvents vs Sleep
    • ►  February (11)
    • ►  January (5)
  • ►  2008 (51)
    • ►  December (7)
    • ►  November (6)
    • ►  October (4)
    • ►  September (4)
    • ►  July (5)
    • ►  June (5)
    • ►  May (5)
    • ►  April (1)
    • ►  March (4)
    • ►  February (8)
    • ►  January (2)
  • ►  2007 (16)
    • ►  December (10)
    • ►  November (6)

About Me

Ted Unnikumaran
View my complete profile