batch - 黑魂3存档备份程序
::黑魂3存档位置%SystemDrive%\Users\%username%\AppData\Roaming\DarkSoulsIII\
@echo off
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
cd /d "%~dp0"
set num=0
md %SystemDrive%\Users\%username%\AppData\Roaming\DarkSoulsIII\
:main
cls
echo. 请选择所需功能:
echo.
echo. 1.备份黑魂3存档
echo.
echo. 2.还原黑魂3存档
echo.
echo. 3.打开黑魂3存档位置
echo.
echo. 4.开启定时备份模式(15分钟)
echo.
if exist "%SystemRoot%\System32\choice.exe" goto Win7Choice
set /p choice=请输入数字并按回车键确认:
echo.
if %choice%==1 goto backup saves
if %choice%==2 goto return saves
if %choice%==3 goto open file
if %choice%==4 goto timely backup
cls
"set choice="
echo 您输入有误,请重新选择。
ping 127.0.1 -n "3">nul
goto main
:Win7Choice
choice /c 1234 /n /m "请输入相应数字:"
if errorlevel 4 goto timely backup
if errorlevel 3 goto open file
if errorlevel 2 goto return saves
if errorlevel 1 goto backup saves
cls
goto main
:backup saves
cls
xcopy "%SystemDrive%\Users\%username%\AppData\Roaming\DarkSoulsIII\*.*" "%~dp0" /c/q/e/y
echo.-----------------------------------------------------------
echo.
echo.已成功将黑魂3存档备份
echo.
goto end
:return saves
cls
xcopy "%~dp0" "%SystemDrive%\Users\%username%\AppData\Roaming\DarkSoulsIII\*.*" /c/q/e/y
echo.-----------------------------------------------------------
echo.
echo.已成功将黑魂3存档还原
echo.
goto end
:open file
cls
start "" "%SystemDrive%\Users\%username%\AppData\Roaming\DarkSoulsIII\"
goto main
:timely backup
cls
xcopy "%SystemDrive%\Users\%username%\AppData\Roaming\DarkSoulsIII\*.*" "%~dp0" /c/q/e/y
set /a num+=1
echo.
echo. 已进行第%num%次备份
echo.
ping -n 900 127.1 >nul
goto timely backup
:end
echo 请按任意键退出。
@Pause>nul
::输入目的地路径,不要加引号
::set /p mu=
::copy %SystemDrive%\Users\%username%\AppData\Roaming\DarkSoulsIII\ D:\DarkSouls3Backup
::exit