add gen bat

This commit is contained in:
Julian Freeman
2026-02-26 12:40:10 -04:00
parent 96288190d8
commit 2de760dea3
2 changed files with 53 additions and 0 deletions

25
gen_md5.bat Normal file
View File

@@ -0,0 +1,25 @@
@echo off
setlocal
if "%~1"=="" goto usage
if "%~2"=="" goto usage
set REMOTE_PATH=%~1
set FILE_NAME=%~2
if not exist "md5_files" mkdir "md5_files"
echo Running rclone hashsum md5 ...
rclone hashsum md5 "%REMOTE_PATH%" --output-file "md5_files\%FILE_NAME%"
if %ERRORLEVEL% equ 0 (
echo Success: MD5 saved to md5_files\%FILE_NAME%
) else (
echo Error: rclone failed
)
goto :eof
:usage
echo Usage: %~nx0 ^<remote:path^> ^<file^>
echo Example: %~nx0 mydrive:backup mybackup.md5
exit /b 1