|
Kiasyn Apprentice
Joined: 05 Dec 2004 Posts: 196 Location: New Zealand
|
Posted: Fri May 13, 2005 12:16 am
compressing log files |
This isn't strictly to do with zMUD... but it would be nice if possible...
I log everything, in a log file for each hour each day, and for each character.
Log files are stored with a filename in the format of:
1-4-3am-Kiasyn.log
1 being the day
4 being the month
3am being the time :p
Kiasyn being the character name.
What im looking for is a quick way to compress logfiles into a zip file... I want to have all the logfiles in a month compressed into a file like:
4-2005.zip
4 being the month
2005 being the year...
is there a way to write a script to do this or will i have to do it manually?
Any help appreciated
Kiasyn |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri May 13, 2005 2:22 am |
Look into the #LAUNCH command. This script will be rather simple for the most part, so really the one important thing you need to work out is learning the command-line syntax for something like winzip, winrar, or whatever compression utility you use.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Mon May 16, 2005 8:50 am |
create "zipit.bat" in your zmud directory with this line in it:
pkzip -m %1-%2.zip *-%1-*-%3.log
create this alias:
#ALIAS archive {#launch {cmd /c zipit.bat %1 %2 %3}}
useage: archive month year Character
download pkz204g.exe and put the pkzip.exe file from it in windows or zmud directory (or anywhere else in your path)
google for pkz204g and click feeling lucky is where i got it from
the -m in the batch file moves the files into the archive... to add only use -a |
|
|
|
Kiasyn Apprentice
Joined: 05 Dec 2004 Posts: 196 Location: New Zealand
|
Posted: Mon May 16, 2005 9:32 am |
ty^^
|
|
|
|
|
|