level 8
::/指定备份目录
Set target_dir=F:\杂物\FH4存档\自动备份
Set timestamp=%date:~0,4%年%date:~5,2%月%date:~8,2%日 %time:~0,2%时%time:~3,2%分%time:~6,2%秒
xcopy "%LOCALAPPDATA%\Packages\Microsoft.SunriseBaseGame_8wekyb3d8bbwe\*.*" "%target_dir%\%timestamp%\Microsoft.SunriseBaseGame_8wekyb3d8bbwe\" /e /h /d /c /y
::/只保留最近50次的备份文件,如果不要此功能把下面的删除
dir /o-d /b %target_dir%>%TMP%\fh4_backup.txt
for /F "skip=50" %%a in (%TMP%\fh4_backup.txt) do @if exist %target_dir%\%%a rd /s /q %target_dir%\%%a





