add gen sizeinfo sh
This commit is contained in:
@@ -4,13 +4,13 @@ setlocal
|
|||||||
if "%~1"=="" goto usage
|
if "%~1"=="" goto usage
|
||||||
if "%~2"=="" goto usage
|
if "%~2"=="" goto usage
|
||||||
|
|
||||||
set PATH=%~1
|
set TARGET_PATH=%~1
|
||||||
set FILE_NAME=%~2
|
set FILE_NAME=%~2
|
||||||
|
|
||||||
if not exist "man_files" mkdir "man_files"
|
if not exist "man_files" mkdir "man_files"
|
||||||
|
|
||||||
echo Running rclone lsf ...
|
echo Running rclone lsf ...
|
||||||
rclone lsf -R --format "sp" --separator "|" --local-encoding "None" --exclude-from exclude-list.txt "%PATH%" > "man_files\%FILE_NAME%"
|
rclone lsf -R --format "sp" --separator "|" --local-encoding "None" --exclude-from exclude-list.txt "%TARGET_PATH%" > "man_files\%FILE_NAME%"
|
||||||
|
|
||||||
if %ERRORLEVEL% equ 0 (
|
if %ERRORLEVEL% equ 0 (
|
||||||
echo Success: File saved to man_files\%FILE_NAME%
|
echo Success: File saved to man_files\%FILE_NAME%
|
||||||
|
|||||||
21
gen_sizeinfo.sh
Normal file
21
gen_sizeinfo.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||||
|
echo "Usage: $0 <path> <file_name>"
|
||||||
|
echo "Example: $0 mydrive:backup|/path/to/dir manifest.txt"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TARGET_PATH="$1"
|
||||||
|
FILE_NAME="$2"
|
||||||
|
|
||||||
|
mkdir -p "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 [ $? -eq 0 ]; then
|
||||||
|
echo "Success: Saved to "man_files/$FILE_NAME""
|
||||||
|
else
|
||||||
|
echo "Error: rclone failed"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user