RSS

complex batch restart script(Feb 24 2010)

24 Feb

Here a  batch file thats will rename and copy your serverlog dynamicly by crash time/date

A bonus is it  also shows the time of each restart in the dos window

Modify as you see fit

@echo off
rem cls
echo Unreal  Server Started
:restart
Unreal.exe  spirevillage.unr?Game=JCoopZ1.JCoopZGame?Mutator=VotingHandler.VotingHandler?Difficulty=3 -server ini=unreallite.ini   log=Server.log

for /f “tokens=2-4 delims=/ ” %%a in (‘date /T’) do set year=%%c
for /f “tokens=2-4 delims=/ ” %%a in (‘date /T’) do set month=%%a
for /f “tokens=2-4 delims=/ ” %%a in (‘date /T’) do set day=%%b
set TODAY=%year%-%month%-%day%
for /f “tokens=1 delims=: ” %%h in (‘time /T’) do set hour=%%h
for /f “tokens=2 delims=: ” %%m in (‘time /T’) do set minutes=%%m
for /f “tokens=3 delims=: ” %%a in (‘time /T’) do set ampm=%%a
set NOW=%hour%%minutes%%ampm%
copy server.log serverlog%today%-%now%.log
echo Unreal Server ReStarted  %TODAY%.%NOW%
goto Restart

 

Advertisements
 
Leave a comment

Posted by on February 24, 2010 in Uncategorized

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s