![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'd like to user logparser to search recursively from a starting directory for all files greater than 200k. Then save the file name, path and date to an html file. I've see where users have used the Top 10 command which I can replicate, but I'm having difficulty doing a search that lists the files if file > 200k. Thanks in advance, Simon |
#3
| |||
| |||
|
|
Simon, There are many ways you can do this: 1) You may find the following code meets your needs. It is taken from the following link on the Scripting site http://www.microsoft.com/technet/com...ts/sg0105.mspx Set objLogParser = CreateObject("MSUtil.LogQuery") Set objInputFormat = _ CreateObject("MSUtil.LogQuery.FileSystemInputForma t") objInputFormat.recurse = 0 Set objOutputFormat = _ CreateObject("MSUtil.LogQuery.NativeOutputFormat") objOutputFormat.rtp = -1 strQuery = "SELECT Name, Size FROM 'C:\Scripts\*.*' ORDER BY Name ASC" objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat 2)You may also want to explore the use of WMI especially when you want to run this operation on a remote computer. (you could change the strTarget value to the name of the remote computer to return data from a remote computer). strTarget="." set objWMIService=GetObject("winmgmts:" & "!\\" & strTarget & "\root\cimv2") set colResultSet=objWMIService.ExecQuery("SELECT * from CIM_DataFile WHERE FileSize>104857600 AND Drive='c:'") for each objResult in colResultSet WScript.echo objResult.FileName, objResult.FileType, objResult.FileSize next Hope this helps AJ "simon" <zlynt (AT) yahoo (DOT) com> wrote in message news:ekrfuxcyFHA.2880 (AT) TK2MSFTNGP12 (DOT) phx.gbl... I'd like to user logparser to search recursively from a starting directory for all files greater than 200k. Then save the file name, path and date to an html file. I've see where users have used the Top 10 command which I can replicate, but I'm having difficulty doing a search that lists the files if file > 200k. Thanks in advance, Simon |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |