#76913 - 2003-09-29 12:36 AM
Re: Enumerate remote files
|
Saleem
Hey THIS is FUN
Registered: 2001-04-11
Posts: 280
Loc: UAE
|
Thnax Lonkero......
It worked..... I was doing a mistake that I was changing the file name too with two @@ (dump ass ) now it worked.
now if we go back back to old cord
code:
$dt1=@date $x1 = SubStr($dt1, Len($dt1) - 9, 4) $x2 = SubStr($dt1, Len($dt1) - 4, 2) $x3 = SubStr($dt1, Len($dt1) - 1, 2) $result=$x1 + $x2 + $x3 $sub=Val($result) $sub1=$sub-7 $dr=Dir("f:\") While $dr <> "" AND @error = 0 $dt=GetFileTime ("f:\$dr") ? $dr ? $dt $dttrm=Left("$dt",10) $y1 = SubStr($dttrm, Len($dttrm) - 9, 4) $y2 = SubStr($dttrm, Len($dttrm) - 4, 2) $y3 = SubStr($dttrm, Len($dttrm) - 1, 2) $result1=$y1 + $y2 + $y3 If ($sub1 > $result1) ;Del "\\mosaic01mz\eventlog\$dr" ;? "less than 7 exist" EndIf $DR=Dir() Loop
I think I have to add that extra "@" to code:
$dt=GetFileTime ("f:\$dr")
here somewhere right ?
_________________________
“I’ll not change you unless you don’t have intention to change yourself”
--H:Quran
|
Top
|
|
|
|
#76916 - 2003-09-29 03:14 AM
Re: Enumerate remote files
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
A current eventlog can never be older than seven days as it is constantly in use. However, backed-up eventlog can be older than seven days. Now, if you want to delete those eventlogs, then why do you back them up in the first place?
Alos, you cna specify how eventlogs overwriten the evententries, and you can also resize the eventlogsizes to have all events for a specific time period into them.
Thus, as other already repeatedly told you, please explain to us in detail what exactly you try to accomplish.
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 507 anonymous users online.
|
|
|