mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
Update Brandons-Minecraft_backup.sh
df
This commit is contained in:
1 parent
dc56739e94
commit
8d0231620d
1 file changed
+1
-27
@@ -1,28 +1,2 @@
|
|||||||
@echo off
|
|
||||||
setlocal
|
|
||||||
|
|
||||||
:: Define Source and Destination
|
|
||||||
set "SOURCE=C:\Users\yates\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang"
|
|
||||||
set "DEST=\\nas\public\game_backups\Minecraft\Brandons-backup"
|
|
||||||
|
|
||||||
:: Map Network Drive
|
|
||||||
net use Z: \\nas\public /user:traver /persistent:yes
|
|
||||||
|
|
||||||
:: Check if the network drive was successfully mapped
|
|
||||||
if %ERRORLEVEL% neq 0 (
|
|
||||||
echo Failed to connect to NAS. Check network access and credentials.
|
|
||||||
exit /b 1
|
|
||||||
)
|
|
||||||
|
|
||||||
:: Ensure destination exists
|
|
||||||
if not exist "%DEST%" mkdir "%DEST%"
|
|
||||||
|
|
||||||
:: Run Robocopy to Move Files
|
:: Run Robocopy to Move Files
|
||||||
robocopy "%SOURCE%" "%DEST%" /z /s /r:2 /w:3 /XD
|
robocopy C:\Users\yates\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang \\nas\public\game_backups\Minecraft\Brandons-backup /z /s /r:2 /w:3 /XD /purge
|
||||||
|
|
||||||
:: Unmap Network Drive
|
|
||||||
net use Z: /delete /yes
|
|
||||||
|
|
||||||
echo Backup completed successfully!
|
|
||||||
pause
|
|
||||||
endlocal
|
|
||||||
Reference in new issue
Block a user