DKP Log Parser Forum Index
 Forum FAQ   Search   Register   Log in 
 About   Download   Forum   Wiki   Development
Archiving logs

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DKP Log Parser Forum Index -> Configuration

Author

Message

SuprSurfr



Joined: 24 May 2007
Posts: 21

PostPosted: Fri May 25, 2007 5:32 pm    Post subject: Archiving logs

Reply with quote


Is use this batch file to archive my logs from the previous day.

Code:
@echo off
setlocal
set Log=eq2log_CharacterName.txt
call :GetDate "%Log%"
goto :eof

:GetDate
Set Filename=%1
Set FileDate=%~t1
For /F "tokens=1,2,3 delims=/ " %%A IN ('echo %FileDate%') do Set ShortDate=%%A%%B%%C
mkdir "backups\%ShortDate%txt"
copy "%Log%" "backups\%ShortDate%txt\%Log%"
Del %Log%
exit


This creates a Folder in the Backup directory with the name of the logfiles date, and copies the logfile to that directory and then deletes the original.
I play EQ2 so I named the .bat script rotate.bat and place it in the:
Code:
C:\Program Files\Sony\Everquest II\Logs\SERVERNAME\

I created the backup Directory:
Code:
C:\Program Files\Sony\Everquest II\Logs\SERVERNAME\Backup

I then placed a shortcut on my desktop to rotate.bat
The script is setup to name the directory by the short date.
We do one raid per day, If you do more than one raid per day you would need to modify the script to include the hour.

I find it handy for archiving old logs incase something goes wrong and you need to reparse them.



backup.JPG
 Description:
 Filesize:  36.01 KB
 Viewed:  1099 Time(s)

backup.JPG


Back to top

Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DKP Log Parser Forum Index -> Configuration All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
SoftGreen 1.1 phpBB theme © DaTutorials.com 2005