Thank you both for your help. I'm reading through your suggestions, (which
I've only seen now, for some reason, I never see responses right away,
anyway....). I did find another script on another forum that helped me mash
out what I want to do. I've modified it to my needs and it seems to work
well. It saves everything to a text file we I can then open in Excel. So
just a few extra steps are required to convert the text data into Excel
format. But now that I think I have the concept down, I may try 'convert' it
to use Excel. There was one good point about exporting things to a log file.
It never occured to me that my users might use a comma in the name of their
word processing files! So I had to switch to using a semi colon for a
delimeter. Anyway, for anyone who is interested, here is my revised code.
And thanks again for the suggestions from both of you. Jeremy
Set objFSO = CreateObject("Scripting.FileSystemObject")
Const ForAppending = 2
Dim objFSO:Set objFSO = CreateObject("Scripting.FileSystemObject")
Wscript.echo "Script is about to start!"
LogFile = "l:\exportme7.txt"
Dim objLogFile:Set objLogFile = objFSO.CreateTextFile(logfile, 2, True)
objStartFolder = "L:\"
Set objFolder = objFSO.GetFolder(objStartFolder)
objLogFile.write "Name;" & "Created;" & "Last Modified;" & "Size;" & "Path;"
& "Type"
objLogFile.Writeline
objLogFile.Write objFolder.Name & ";;;"
'objLogFile.Write objFolder.datecreated & ";"
'objLogFile.Write objFolder.datelastmodified & ";"
'objLogFile.Write objFolder.size & ";"
objLogFile.Write objFolder.Path & ";"
objLogFile.Writeline
Set colFiles = objFolder.Files
For Each objFile in colFiles
objLogFile.Write objFile.Name & ";"
objLogFile.write objFile.datecreated & ";"
objLogFile.write objFile.datelastmodified & ";"
objLogFile.write objFile.size & ";"
objLogFile.Write objFile.path & ";"
objLogFile.Write objFile.Type
objLogFile.Writeline
Next
ShowSubfolders objFSO.GetFolder(objStartFolder)
Sub ShowSubFolders(Folder)
For Each Subfolder in Folder.SubFolders
objLogfile.Write subfolder.Name & ";"
objLogFile.write subfolder.datecreated & ";"
objLogFile.write subfolder.datelastmodified & ";"
objLogFile.write subfolder.size & ";"
objLogFile.Write Subfolder.Path & ";"
objLogFile.write subfolder.Type
objLogFile.Writeline
Set objFolder = objFSO.GetFolder(Subfolder.Path)
Set colFiles = objFolder.Files
For Each objFile in colFiles
objLogFile.Write objFile.Name & ";"
objLogFile.Write objFile.datecreated & ";"
objLogFile.Write objFile.datelastmodified & ";"
objLogFile.Write objFile.size & ";"
objLogFile.Write objFile.path & ";"
objLogFile.write objFile.type
objLogFile.Writeline
Next
ShowSubFolders Subfolder
Next
End Sub
objLogFile.Close
wscript.echo "Script Finished!!!"