Simple VBScript to get the filenames, file size etc.

Simple VBScript to get the filenames, file size and date created given the folder path

On Error Resume Next

Dim objFSO, oFolder, files, logFile, folderPath

'fso object
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Parse Argument
folderPath = Wscript.Arguments.Item(0)
 
'Quit if no argument is passed

If folderPath = "" Then
   Wscript.Echo "No Folder parameter was passed"
   Wscript.Quit
End If

'Get folder & files
Set logFile = objFSO.CreateTextFile(folderPath&"\logFile.txt", True)
Set oFolder = objFSO.GetFolder(folderPath)
Set files = oFolder.Files

'Loop
For each file In files
  logFile.WriteLine(file.Name & " " & file.size & " bytes " & " 
  DateCreated " & file.DateCreated)
Next

logFile.Close