Hi Everyone. I have developed a script that will display the name and
creation time of files listed in a directory, but I need to display all
files in all subfolders as well. So for example, if I were looping
through the local disk (C:) drive, I would like a list of all files in
all subfolders beyond c:/. I don't need any folder names, just the file
names and creation times.
Here's the script i've come up with so far and a sample of the output
is below as well.
--------------------------------------SCRIPT----------------------------------------------------------
Set objLogParser = CreateObject("MSUtil.LogQuery")
Set objInputFormat =
CreateObject("MSUtil.LogQuery.FileSystemInputFormat")
objInputFormat.Recurse = 0
Set objOutputFormat =
CreateObject("MSUtil.LogQuery.NativeOutputFormat")
objOutputFormat.rtp = -1
strQuery = "SELECT Name, CreationTime INTO output.txt FROM 'C:\*.*' " &
_
"WHERE NOT Attributes LIKE '%D%' ORDER BY CreationTime"
objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat
--------------------------------------END
SCRIPT---------------------------------------------------
----------------------------------------OUTPUT-------------------------------------------------------
Name CreationTime
-------------- -----------------------
NTDETECT.COM 2004-08-03 21:38:34.0
ntldr 2004-08-03 21:59:34.0
pagefile.sys 2006-06-13 11:20:23.166
boot.ini 2006-06-13 11:25:48.544
AUTOEXEC.BAT 2006-06-13 15:38:36.500
IO.SYS 2006-06-13 15:38:36.500
CONFIG.SYS 2006-06-13 15:38:36.500
MSDOS.SYS 2006-06-13 15:38:36.500
ptdebug.txt 2006-06-14 09:28:37.199
test1.csv 2006-06-15 14:23:30.981
tmp.drf 2006-08-04 01:53:32.731
sqmnoopt00.sqm 2006-09-26 13:20:59.183
sqmdata00.sqm 2006-09-26 13:20:59.183
sqmnoopt01.sqm 2006-09-26 14:33:36.575
sqmdata01.sqm 2006-09-26 14:33:36.595
sqmnoopt02.sqm 2006-09-27 08:15:13.800
sqmdata02.sqm 2006-09-27 08:15:14.922
sqmnoopt03.sq 2006-10-02 08:17:45.566
sqmdata03.sqm 2006-10-02 08:17:45.616
----------------------------------------END
OUTPUT---------------------------------------------------
If anybody has any suggestions, it would be greatly appreciated. Thanks
so much.
Justin Fancy