Skip to content

Instantly share code, notes, and snippets.

@anunay
Created February 11, 2014 06:42
Show Gist options
  • Save anunay/8930285 to your computer and use it in GitHub Desktop.
Save anunay/8930285 to your computer and use it in GitHub Desktop.
List all files inside a directory
<?php
foreach (glob("*.txt") as $filename) {
echo "$filename size " . filesize($filename) . "\n";
}
?>
@anunay
Copy link
Author

anunay commented Feb 11, 2014

Set objFSO = CreateObject("Scripting.FileSystemObject")
objStartFolder = "C:\Scripts"

Set objFolder = objFSO.GetFolder(objStartFolder)

Set colFiles = objFolder.Files
For Each objFile in colFiles
Wscript.Echo objFile.Name
Next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment