Answer:
Set args = Wscript.Arguments
If (WScript.Arguments.Count <> 1) Then
Wscript.Echo "Specify the folder name as a command line argument."
Else
objStartFolder = args.Item(0)
Set objFSO = CreateObject("Scripting.FileSystemObject")
if (Not objFSO.FolderExists(objStartFolder)) Then
Wscript.Echo "Folder "&objStartFolder&" does not exist"
Else
Set objFolder = objFSO.GetFolder(objStartFolder)
Set colFiles = objFolder.Files
For Each objFile in colFiles
Wscript.Echo objFile.Name, objFile.Size, objFile.DateCreated
Next
End If
End If
Step-by-step explanation:
Here's some code to get you started.