#!/bin/bash if [ -z "$1" ] || [ -z "$2" ]; then echo "Usage: $0 " 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