Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Kiasyn
Apprentice


Joined: 05 Dec 2004
Posts: 196
Location: New Zealand

PostPosted: 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
_________________
Kiasyn
Owner of Legends of Drazon
Coder on Dark Legacy
Check out Talon, an easy IMC connection.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Private
Adept


Joined: 10 Jan 2002
Posts: 264
Location: USA

PostPosted: 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
Reply with quote
Kiasyn
Apprentice


Joined: 05 Dec 2004
Posts: 196
Location: New Zealand

PostPosted: Mon May 16, 2005 9:32 am   
 
ty^^
_________________
Kiasyn
Owner of Legends of Drazon
Coder on Dark Legacy
Check out Talon, an easy IMC connection.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net