Created
April 8, 2023 23:02
-
-
Save allenk/f2760d387b3d732b8c1c11fcd44ab875 to your computer and use it in GitHub Desktop.
Move Files and Log
This file contains hidden or 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
@echo off | |
:: ------------------------------------------------------------------------------------------------------------ | |
:: Backup Package Installation | |
:: ------------------------------------------------------------------------------------------------------------ | |
:: You should check errors from logs with 資料錯誤 (循環冗餘檢查) | |
echo Backup packages ... [email protected] | |
setlocal enabledelayedexpansion | |
:: backup package list | |
SET packagelist="Fodler1" "Fodler2" "Fodler3" "Fodler4" "Fodler5" "Fodler6" | |
for %%i in (%packagelist%) do ( | |
SET token=%%i | |
SET token=!token:"=! | |
echo ============================================ | |
echo --- Restore Top Folder "!token!" | |
echo ============================================ | |
echo . | |
robocopy "P:\!token!" "Z:\!token!" /E /Z /MOVE /COPYALL /R:2 /W:2 /LOG:"RestoreP_!token!.log" | |
echo . | |
echo ============================================ | |
echo --- Finish "!token!" | |
echo ============================================ | |
echo . | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment