-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates MOVESMaster.bat to archive moveslog.txt files instead of only…
… keeping the most recent log (#52) MOVESMaster now renames old log files with the current timestamp and adds them to `moveslog.zip`. This prevents the accidental deletion of old log files.
- Loading branch information
1 parent
5d0f380
commit 14efa27
Showing
3 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,25 @@ | ||
@echo off | ||
call setenv.bat | ||
|
||
set HR=%time:~0,2% | ||
set HR=%Hr: =0% | ||
set HR=%HR: =% | ||
set logfile=moveslog_archive_%date:~10,4%-%date:~4,2%-%date:~7,2%_%HR%%time:~3,2%.txt | ||
if exist sharedwork\*.* erase /Q /S /F sharedwork\*.* | ||
if exist WorkerFolder\*.* erase /Q /S /F WorkerFolder\*.* | ||
if exist moveslog_old.txt erase moveslog_old.txt | ||
if exist moveslog.txt rename moveslog.txt moveslog_old.txt | ||
call setenv.bat | ||
ant rungui | ||
|
||
if exist moveslog.txt REN "moveslog.txt" "%logfile%" | ||
|
||
if exist %logfile% ( | ||
if not exist moveslog.zip ( | ||
jar cMf moveslog.zip "%logfile%" && del "%logfile%" | ||
) else ( | ||
jar uMf moveslog.zip "%logfile%" && del "%logfile%" | ||
) | ||
) | ||
|
||
ant rungui | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters