add gen bat
This commit is contained in:
28
gen_combined.bat
Normal file
28
gen_combined.bat
Normal file
@@ -0,0 +1,28 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if "%~1"=="" goto usage
|
||||
if "%~2"=="" goto usage
|
||||
|
||||
set MD5_FILE=%~1
|
||||
set TARGET_DIR=%~2
|
||||
|
||||
for %%F in ("%MD5_FILE%") do set "FILE_BASENAME=%%~nF"
|
||||
set "COMBINED_FILE=%FILE_BASENAME%.txt"
|
||||
|
||||
if not exist "combined_files" mkdir "combined_files"
|
||||
|
||||
echo Running rclone check ...
|
||||
rclone check "md5_files\%MD5_FILE%" "%TARGET_DIR%" --local-encoding "None" --exclude-from exclude-list.txt --checkfile md5 --combined "combined_files\%COMBINED_FILE%"
|
||||
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo Success: Saved to "combined_files\%COMBINED_FILE%"
|
||||
) else (
|
||||
echo Note: rclone check finished (return value %ERRORLEVEL% might be different
|
||||
)
|
||||
goto :eof
|
||||
|
||||
:usage
|
||||
echo Usage: %~nx0 ^<md5_file^> ^<target_dir^>
|
||||
echo Example: %~nx0 mybackup.md5 C:\Local\Backup
|
||||
exit /b 1
|
||||
Reference in New Issue
Block a user