![]() |
| | #1 (permalink) | ||
| windows scripting <insert outrageous comment here> Va prezint cod extras din Hey, Scripting Guy! [code]Hey, Scripting Guy! I’d like to have a script that can search my computer for all files older than a certain date, and then automatically delete those files. Can I do that? strDate = "20031102000000.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 [/code] Acu, ce-i fac eu liniei asteia sa se uite doar intr-un singur director nu sa-mi caute ca tampita peste tot. [code] ("winmgmts:\\" & strComputer & "\root\cimv2") [/code] Sau altfel, cine ii da calea? Asta cumva? strComputer = "."
__________________ It has been said that the contents of the rules sections of sendmail.cf most closely resemble the effect of line noise on a non-error-correcting modem. It has also been said that capturing such line noise into a text file has about as much chance of resulting in a working sendmail.cf as does any attempt to actually edit that file. Romania, the land of "sunt obisnuit cu 10-11MB si imi vine greu cu 5,7M" Last edited by droopy; 26-05-2006 at 14:36.. | |||
|
| | #3 (permalink) | ||
| > Wscript.Echo objFile.Name s/Echo/Delete sau ceva in gen. Vezi la MS pe site. winmgmts:// cheama WMI-ul.
__________________ It has been said that the contents of the rules sections of sendmail.cf most closely resemble the effect of line noise on a non-error-correcting modem. It has also been said that capturing such line noise into a text file has about as much chance of resulting in a working sendmail.cf as does any attempt to actually edit that file. Romania, the land of "sunt obisnuit cu 10-11MB si imi vine greu cu 5,7M" | |||
|
| Advertisment | |
Cumpără jocuri prin SMSRapid si sigur! | |
![]() |
|
| Thread Tools | |
| |