One click backup of save files

Disclaimer

As always - use at own risk. I take no responsibility for whatsoever.

Dependencies

The script is only using windows native functions.

For compressing the save files into a .zip it is using powershell.

It is required to have powershell version 5 or higher installed. (should be default)

Creating A .bat Or .cmd Script To Backup The Files

To create the script perform the following Steps

Windows + R Notepad.exe Enter Copy paste the code below ::Author: https://steamcommunity.com/id/-LuckyStrike-/ ::Date: 18.07.2021 ::Version: 001 ::turn command-echoing off. @echo off ::define the paths to the backup location and to the save files, create the backup folder if it does not exist. :init set BackupDir=%Userprofile%\Documents\SWPT_BACKUP\ set SaveDir='%userprofile%\appdata\LocalLow\L2 Games\She Will Punish Them\' if not exist %BackupDir% mkdir %BackupDir% ::Check if the game is currently running or not :Chk tasklist /FI "STATUS eq RUNNING" /FI "Imagename eq She Will Punish Them.exe" | find "INFO: No tasks are running which match the specified criteria." if errorlevel 1 goto :ERR_RUN ::get the timestamp and compress the save file directory into a zip :compress call :timestamp powershell Compress-Archive -Path %SaveDir% -DestinationPath "%BackupDir%SWTP_%dtStamp%.zip" echo Backup %BackupDir%SWTP_%dtStamp%.zip created timeout /t 3 /nobreak exit ::create the timestamp :timestamp SET HOUR=%time:~0,2% SET dtStamp9=%date:~0%_0%time:~1,1%%time:~3,2%%time:~6,2% SET dtStamp24=%date:~0%_%time:~0,2%%time:~3,2%%time:~6,2% if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%) goto:eof ::error function in case the game is running, display an error message an try again after 60 seconds :ERR_RUN echo Game is currently running. Please close the game first. timeout /t 60 goto :Chk click on File Save as Enter the filename:

SWPT_Backup.cmd or SWPT_Backup.bat Choose the file type

Save as type: All Files (*.*) click on Save

You are now good to go - Simply double click on the file to create a Backup (yeah i know, i said one click but its a double click :D )

Note: The script will check if the game is currently running and will NOT create a backup if the game is still open. This is to avoid backup corruption in case the game is saving something at the moment of creation. The script will then try again after 60 seconds.

Per default the script will save the files into the current users \Documents folder in the sub-directory SWPT_BACKUP

You can also use this to create backups of the character presets only (e.g. for sharing them)

to do so change the 'set SaveDir' line to something like this:

set SaveDir='%userprofile%\appdata\LocalLow\L2 Games\She Will Punish Them\Character Presets\' This will make a backup of all Presets in the Character Presets folder. To create only a backup from a specific preset you have to set the correct path to the subdir in '...\Character Presets\'

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=2550624868					

More She Will Punish Them guilds