Jump to content

Log Rotator Folder Naming Issue with Regional Settings


ReDBaroN

Recommended Posts

Hi, anyone know how to change the standard epoch log rotator so it names the folders correctly for english Uk regional settings? Currently it's like this:

:: Set Time and Date
SET HOUR=%time:~0,2%
SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%_%time:~6,2%
SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%_%time:~6,2%
::Make Date Stamp
if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)
ECHO Todays Date and time (%date%)(%time%) / %dtStamp%
if %debug% == 1 (
timeout %dbsecs%
)

But, that means all the dates and times of the folders are messed up for me... Please see examples below.

log%20rotator.jpg

log%20rotator2.jpg

 

Thanks for any help  :)

Edited by ReDBaroN
Link to comment
Share on other sites

This also happens to for A2 Dayz Mod Epoch.....

 

Would be really grateful if anyone could help with this regional settings issue. I know there is a way to make the folders name correctly regardless as to whether your server is set to US or UK but, personally I don't know how to change it ....

Link to comment
Share on other sites

image.png

 

My code 
 

timeout /t 9
@echo off


:::::::::::::: CONFIG ::::::::::::::::::

:: Set your Arma3 Epoch Base installation directory. LEAVE OFF THE ENDING \
set arma3srvpath=C:\Arma 3 Server

:: Set your Default server profile name. This is the name of the directory that stores your server.cfg
:: This will be used in the case that you don't launch this script without the server param.
:: Example: SC, US6, Chicago13, ect
:: DEFAULTPROFILE
set srvname=SC
:: Delete Original log files after they have been rotated? This keeps your logs more organized and saves space.
:: This will not work unless the server is stopped first. This option works best set to 1 when using FireDaemon's Pre/Post Service tab
set deloriglogs=0


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::  STOP EDITING ::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


:: Set Time and Date
set now=%TIME:~0,-3%
set now=%now::=%
set now=%now: =0%
set now=%DATE:~-4%%DATE:~3,2%%DATE:~0,2%_%now%

::copy
md "C:\BACKUP\A3_EPOCH\%now%"
xcopy "%arma3srvpath%\DB\dump.rdb"  "C:\BACKUP\A3_EPOCH\%now%\"


del /Q /F "%arma3srvpath%\%servername%\A3Master_*.log"
del /Q /F "%arma3srvpath%\%servername%\arma3server_*.rpt"

exit
Link to comment
Share on other sites

  • 3 weeks later...

 

image.png

 

My code 

 

timeout /t 9
@echo off


:::::::::::::: CONFIG ::::::::::::::::::

:: Set your Arma3 Epoch Base installation directory. LEAVE OFF THE ENDING \
set arma3srvpath=C:\Arma 3 Server

:: Set your Default server profile name. This is the name of the directory that stores your server.cfg
:: This will be used in the case that you don't launch this script without the server param.
:: Example: SC, US6, Chicago13, ect
:: DEFAULTPROFILE
set srvname=SC
:: Delete Original log files after they have been rotated? This keeps your logs more organized and saves space.
:: This will not work unless the server is stopped first. This option works best set to 1 when using FireDaemon's Pre/Post Service tab
set deloriglogs=0


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::  STOP EDITING ::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


:: Set Time and Date
set now=%TIME:~0,-3%
set now=%now::=%
set now=%now: =0%
set now=%DATE:~-4%%DATE:~3,2%%DATE:~0,2%_%now%

::copy
md "C:\BACKUP\A3_EPOCH\%now%"
xcopy "%arma3srvpath%\DB\dump.rdb"  "C:\BACKUP\A3_EPOCH\%now%\"


del /Q /F "%arma3srvpath%\%servername%\A3Master_*.log"
del /Q /F "%arma3srvpath%\%servername%\arma3server_*.rpt"

exit

Thanks! Sorry for slow reply, will give this a go now. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...