Sometimes when you play old games it is better to save daily a zipfile of the content of the full directoty as it could be possible to lost some data or objects.
On Windows I created a.bat file that uses wmic to get the timestamp (so is not dependant to locale), create an file name and run 7zip to create an archive of the game folder.
As an example:
@echo off
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%"
set filename="E:\GOGLibrary\ShardOfSpingBackup_%datestamp%_%timestamp%.zip"
set SHARDDIR="E:\GOGLibrary\Shard of Spring"
set SEVENZIP="C:\Program Files\7-Zip\7z.exe"
echo calling ... %SEVENZIP% a -r %filename% %SHARDDIR%
call %SEVENZIP% a -r %filename% %SHARDDIR%
pause
I would like to create a similar script on Amiga, but I can't find how to set a variable with a timestamp.
Any suggestion? (Thank you!)
Edited by MazinKaesar on 2025/11/24 20:48:59