Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: Creating a script to change logs files to the creation date

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,38088
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: Creating a script to change logs files to the creation date
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 RE: Creating a script to change logs files to the creat... - 9/27/2006 5:09:33 AM   
  devinw1

 

Posts: 11
Score: 0
Joined: 9/26/2006
Status: offline
We are getting extremely close now....you have no idea how much I appreciate your help!  My final question is...is there anyway to change the date format?  As right now it will appear as 9272006.log.  What I would like to see is 20060927.log.  If not, I'm certain we can live with it this way, but if there is could you let me know what I can change?  Thanks!

_____________________________

Devin

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 21
 
 RE: Creating a script to change logs files to the creat... - 9/27/2006 8:48:32 AM   
  DiGiTAL.SkReAM


Posts: 1170
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
The brutish, non-elegant method, because I'm kind of in a hurry right now, will edit it with a more elegant method later:
Warning: AirCode ahead

      


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to devinw1)
 
 
Post #: 22
 
 RE: Creating a script to change logs files to the creat... - 9/27/2006 2:12:17 PM   
  devinw1

 

Posts: 11
Score: 0
Joined: 9/26/2006
Status: offline
Well it looks like that will work if the month is a 10, 11, or 12...however on all the other months, it adds an extra digit on the end, ex.  20069272.log (note the extra 2 on the end).  If we can make the month 2 characters long, I think that should work fine.

The other problem that I noticed is that if one of the files already exists, the new filename for the next file is back to the old style 9272006.log.  I imagine this is something that needs to be modified in the second IF command.  Thanks

_____________________________

Devin

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 23
 
 RE: Creating a script to change logs files to the creat... - 9/27/2006 7:13:00 PM   
  gdewrance


Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
does the new script still have an option to rename the log file after a certain number of days. I dont see it.
e.g.backup and rename if file is created or modified after 7 days

(in reply to devinw1)
 
 
Post #: 24
 
 
Page:  <<   < prev  1 [2]
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: Creating a script to change logs files to the creation date Page: <<   < prev  1 [2]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts