Skip to content

Instantly share code, notes, and snippets.

@ThomasDalla
Last active January 28, 2022 19:20
Show Gist options
  • Select an option

  • Save ThomasDalla/9fd6041d546d6898fac6ce87836f588d to your computer and use it in GitHub Desktop.

Select an option

Save ThomasDalla/9fd6041d546d6898fac6ce87836f588d to your computer and use it in GitHub Desktop.
Upload all 7z files (split with 7z-folder) for the given folder to 1and1
#!/bin/bash
if [ -z "$1" ]; then
echo "Need to pass the year to process"
else
YEAR=$1
echo "Processing year $YEAR"
for f in $(ls $YEAR.7z.*)
do
echo "Uploading $f"
rclone --config ~/.config/rclone/rclone.conf copy --progress $f 1and1:/Pictures/
done
echo "Done! Checking md5..."
1and1 "cd Pictures && md5sum -c $YEAR.7z.md5"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment