(imported comment written by JamesN91)
Almost there…
// get the list of the files and their paths
parameter “outputfile” = “{pathname of parent folder of regapp “besclient.exe”}\doc_inv.txt”
waithidden {pathname of system folder}\cmd.exe /C dir /s /b c:*.txt, *.doc, *.docx, *.docm, *.dotm, *.xls, *.xlsx, *.xlsm, *.xlsb, *.xlam, *.pptx, *.pptx, *.potx, *.potm, *.ppam, *.ppsx, *.ppsm, *.accdb, *.accde, *.accdt, *.accdr, *.mdb, *.ppt, *.pdf, *.zip >"{parameter “outputfile”}"
// go through the list in relevance to remove docs and settings and look up size/dates
appendfile {concatenation “%0d%0a” of (if (exists (file (it))) then (modification time of file(it) as string & " – " & (size of file(it) as string) & " – " & it ) else nothings) of lines whose (it as lowercase does not contain “documents and settings”) of file (parameter “outputfile”)}
// replace the output file with the new file
delete “{parameter “outputfile”}”
move __appendfile “{parameter “outputfile”}”
2 issues…
-
The “doc_inv.txt” only contains txt files. No other docx, pdf, etc. I have a “findme.rtf” that was not in the Docs_inv.txt. Worst case I could probally do multiple “Dir” searches and append to the Docs_inv.txt, but I would assume 1 command would do it all. After testing at the local dos prompt it almost seems to be a DIR issue.
-
The second relevance statement does not parse out “Document and Settings” folder.
-ie
Tue, 15 Dec 2009 11:34:28 -0600 – 3213736 – c:\Documents and Settings\Administrator\Local Settings\Temp\XXXXX.txt
EDIT
Attempting a FOR loop…
FOR /d %n in (c:*) DO @IF “%n”==“c:\Documents and Settings” ("") ELSE DIR /s /b /TA c:\ *.doc, *.docx, *.docm, *.dotm, *.xls, *.xlsx, *.xlsm, *.xlsb, *.xlam, *.pptx, *.pptx, *.potx, *.potm, *.ppam, *.ppsx, *.ppsm, *.accdb, *.accde, *.accdt, *.accdr, *.mdb, *.ppt, *.pdf, *.zip >