Skip to content

Instantly share code, notes, and snippets.

@LesFerch
Created January 29, 2025 14:44
Show Gist options
  • Save LesFerch/78423d9c83cd8d22ed52d9184add3d14 to your computer and use it in GitHub Desktop.
Save LesFerch/78423d9c83cd8d22ed52d9184add3d14 to your computer and use it in GitHub Desktop.
Using FSO in VBScript to Iterate through files in folder
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder("C:\Test")
For Each oFile In oFolder.Files
WScript.Echo oFile.Name
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment