PDA

View Full Version : Auto compress and upload



Feel-Ya
September 25th, 2007, 10:11 PM
Hello!
I'm new to linux and I'm an owner of Counter-Strike public server.
The server runs okay and it is recording game replays, and for Half-Life it's demos.
They are stored in one directory, but I need them to be compressed (each demo in seperate archive) and after, uploaded to the webserver.

Could anyone tell me how to do this, or it would be much better if you could provide me with this kind of script, where I just have to change the directories.
Thanks in advance!

Feel-Ya
September 30th, 2007, 05:53 AM
Umm.... BUMP?

cwaldbieser
September 30th, 2007, 01:18 PM
Umm.... BUMP?

I think you need to provide more information. For example, how are you manually doing the compress and upload at this time?

Feel-Ya
September 30th, 2007, 07:19 PM
Well.... I just take the demo file, compress it with *.zip and then just move to webpage folder.

cwaldbieser
September 30th, 2007, 09:40 PM
Well.... I just take the demo file, compress it with *.zip and then just move to webpage folder.

Well, if you are simply compressing and moving the files to another directory on the same server, why not something like:


ZIPFILE=/path/to/destination/archive
SOURCEFILES="file1 file2 file3 etc."
zip "$ZIPFILE" $SOURCEFILES