Last active
October 9, 2016 09:29
-
-
Save willmendesneto/ad9ae4d004c453c9103e5cc23abac1e8 to your computer and use it in GitHub Desktop.
Organize videos and images in media backup
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
# | |
# How to setup | |
# | |
# Navigates to your local backup folder | |
# | |
# chmod +x ./list-videos-backup.sh | |
# ./list-videos-backup.sh | |
# | |
CLI_FILES=$(ls) | |
ROOT_FOLDER=$(pwd) | |
while read -r line; do | |
cd "$line"; | |
if [ -d ./Videos ]; then | |
echo "$line - You already have this folder"; | |
else | |
mkdir Videos && mv *.{MOV,mp4} Videos; | |
fi | |
cd "$ROOT_FOLDER"; | |
done <<< "$CLI_FILES" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment