Skip to content

Instantly share code, notes, and snippets.

@Makeshift
Last active June 28, 2016 15:37
Show Gist options
  • Save Makeshift/2b9d028d8232ee30a37e to your computer and use it in GitHub Desktop.
Save Makeshift/2b9d028d8232ee30a37e to your computer and use it in GitHub Desktop.
Automatic upload of files in a particular folder to amazon clouddrive
#!/bin/bash
FOLDER="/home/plex/toupload"
inotifywait -m $FOLDER -e create -e moved_to |
while read path action file; do
echo "The file '$file' appeared in directory '$path' via '$action'"
acd_cli ul $FOLDER/"$file" /Media/Unsorted/
rm -rf $FOLDER/"$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment