-
Does anyone have a batch file (I'm on NT) that will rename the alert.log with the date added to it? I'm looking into writing this myself, but it is proving to be more problematic than expected. Hoping to save some time...
Thanks
-mcslain
-
@ECHO Off
FOR /F "TOKENS=1,2,3,4 DELIMS=/, " %%A IN ('DATE/T') DO SET DYNOM=%%A
FOR /F "TOKENS=1,2,3,4 DELIMS=/, " %%A IN ('DATE/T') DO SET DYMON=%%B
FOR /F "TOKENS=1,2,3,4 DELIMS=/, " %%A IN ('DATE/T') DO SET DYDT=%%C
FOR /F "TOKENS=1,2,3,4 DELIMS=/, " %%A IN ('DATE/T') DO SET DYYR=%%D
ren alert.log "Alert-"%DYNOM%-%DYMON%-%DYDT%-%DYYR%.log
Hope this helps
Anurag
Appreciation is a wonderful thing;
It makes what is excellent in others belong to us as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|