Last active
March 21, 2022 20:25
-
-
Save gordonglas/c8c748f18e5ee64bfdb2ca7251f33659 to your computer and use it in GitHub Desktop.
Backup "Elden Ring" save game folder to a specified location
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
: Backup "Elden Ring" save game folder to a specified location. | |
: Requires 7zip. | |
@echo off | |
set sevenZipExe=D:\Program Files\7-Zip\7z.exe | |
set erPath=%appdata%\EldenRing | |
set backupPath=D:\Users\gglas\Downloads\backup | |
set cwd=%cd% | |
: get timestamp in YYYYMMDD-HHMMDDSS format | |
set timestamp=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%-%TIME:~0,2%%TIME:~3,2%%TIME:~6,2% | |
: when %TIME% is less than 10th hour, it will have a leading space. | |
: replace the space with a zero | |
set timestamp=%timestamp: =0% | |
set backupErPath=%backupPath%\EldenRing\%timestamp% | |
if not exist "%backupErPath%" mkdir "%backupErPath%" | |
cd /D "%erPath%\.." | |
"%sevenZipExe%" a "%backupErPath%\EldenRing.7z" ".\EldenRing" | |
cd /D "%cwd%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment