Created
August 25, 2011 21:07
-
-
Save LukeChannings/1171957 to your computer and use it in GitHub Desktop.
A script to check for films in a directory, and move them to another directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Check for Film | |
# - A script to check for films in a directory, | |
# - and move them to another directory. | |
# | |
## | |
CHECKDIR="/Volumes/Media/Downloads" # Directory to check for videos. | |
MOVEDIR="/Volumes/Media/Videos/Films" # Directory to move videos to. | |
# Loop through applications. | |
while read -r file; do | |
# Check if the file is greater than 600MB. | |
if [ `stat -f%z "$file"` -gt 629145600 ];then | |
# Move to the destination. | |
mv "$file" "$MOVEDIR" | |
fi | |
done < <(find $CHECKDIR -name *.avi -maxdepth 1 2> /dev/null) | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment