Red Eclipse Logging Trick

Hey guys, I have a little batch file hack here that involves Red Eclipse logging. For those of you that don't know, every time you launch Red Eclipse, everything that gets output to the console and chat console gets logged to a text file in the Red Eclipse home directory.
I like having an archive of logs, so I added this to my redeclipse.bat file:
--NOTE-- THIS DOES NOT WORK ON LINUX, AS BASH HAS DIFFERENT SHELL CODE. PLEASE SEE ARAND'S POST BELOW.
That shell code could probably be better written, but for here's an explanation for those who do not understand. What it does is grab the system's current date and time, and make that the name of the log file, and they all go inside a folder called "logs" inside the home folder.
The log naming scheme is: MM-DD-YYYY_HH.mm.SS.txt
Where M is Month, D is Day, Y is Year, H is Hours, m is Minutes, and S is Seconds.
So, for example, you could have "01-15-2012_19.38.13.txt" as one of your logs. The cool part about this, is that every time you start Red Eclipse, a new log file will be created, since the time will always be different :) With this method, you can have an archive of logs, through any number of startups. This is good for anyone who likes logging information, and especially for server admins who don't have access to the local server.
Enjoy, guys! Just be sure to delete old logs every now and again, otherwise you'll accumulate quite a lot of disk space to these logs :P
I like having an archive of logs, so I added this to my redeclipse.bat file:
--NOTE-- THIS DOES NOT WORK ON LINUX, AS BASH HAS DIFFERENT SHELL CODE. PLEASE SEE ARAND'S POST BELOW.
- {l Code}: {l Select All Code}
rem -- ZeroKnight Log Hack --
@for /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do @(
set notused=%%A
set month=%%B
set day=%%C
set year=%%D
set fulldate=%%B-%%C-%%D
)
@for /F "tokens=1,2,3,4 delims=:." %%A in ('echo %TIME%') do @(
set hour=%%A
set minute=%%B
set second=%%C
set notused=%%D
set fulltime=%%A.%%B.%%C
)
set LOGNAME=%fulldate%_%fulltime%.txt
rem -- END ZeroKnight Log Hack --
rem set SDL_VIDEO_WINDOW_POS=0,0
set RE_DIR=.
set RE_OPTIONS=-glogs/%LOGNAME% -r
That shell code could probably be better written, but for here's an explanation for those who do not understand. What it does is grab the system's current date and time, and make that the name of the log file, and they all go inside a folder called "logs" inside the home folder.
The log naming scheme is: MM-DD-YYYY_HH.mm.SS.txt
Where M is Month, D is Day, Y is Year, H is Hours, m is Minutes, and S is Seconds.
So, for example, you could have "01-15-2012_19.38.13.txt" as one of your logs. The cool part about this, is that every time you start Red Eclipse, a new log file will be created, since the time will always be different :) With this method, you can have an archive of logs, through any number of startups. This is good for anyone who likes logging information, and especially for server admins who don't have access to the local server.
Enjoy, guys! Just be sure to delete old logs every now and again, otherwise you'll accumulate quite a lot of disk space to these logs :P