@echo off setlocal if "%~1"=="" goto usage if "%~2"=="" goto usage set TARGET_PATH=%~1 set FILE_NAME=%~2 if not exist "man_files" mkdir "man_files" echo Running rclone lsf ... rclone lsf -R --format "sp" --separator "|" --local-encoding "None" --exclude-from exclude-list.txt "%TARGET_PATH%" > "man_files\%FILE_NAME%" if %ERRORLEVEL% equ 0 ( echo Success: File saved to man_files\%FILE_NAME% ) else ( echo Error: rclone failed ) goto :eof :usage echo Usage: %~nx0 ^ ^ echo Example: %~nx0 [mydrive:backup^|C:/local/path] manifest.txt exit /b 1