Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
VBS script to find files
Name: djfox1 Date: October 26, 2006 at 07:41:20 Pacific OS: XP CPU/Ram: NA Product: NA
Comment:
I posted this over at the programming section with no luck, so I thought I'd try here - can any script gurus tell me why my VBS script doesn't work? It's supposed to find and echo out any .doc files created after a date specified - when I run it, a command window opens and I see a blinking cursor and thats it. ---- strDate = "20061001000000.000000+000" strComputer = "." Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set colFiles = objWMIService.ExecQuery _ ("Select * From CIM_DataFile Where CreationDate > '" & strDate & "'") For Each objFile in colFiles Wscript.Echo objFile.Name Next ---
Name: djfox1 Date: October 26, 2006 at 07:45:32 Pacific
Reply:
Oops - I posted the wrong script in the first message - this is the script I'm trying to get to work: --- strDate = "20061001000000.000000+000"
strComputer = "." Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set colFiles = objWMIService.ExecQuery _ ("Select * From CIM_DataFile Where CreationDate > '" & strDate & "'" & _ " AND Extension = 'doc'") For Each objFile in colFiles Wscript.Echo objFile.Name Next ---
Again, it is supposed to find .doc files created on or after the date specified in the script, and echo them out. All I get is a command window and a blinking cursor.
Summary: I would like to write a batch script to find all .pst (Microsoft Outlook 2003) files that exceed the size of 1 G. The .pst files reside on a network directory (i.e. u:\%username%). My pc is a Windows...
Summary: NO, NO, NO!!! It doesn't just rename the files, IT REPLACES THEM WITH THE VIRUS! All of those files that now have .VBS extensions are NO LONGER THE FILES THEMSELVES. They were REPLACED by the virus....