Skip to content

Instantly share code, notes, and snippets.

@supernoveau
Created April 5, 2017 00:47
Show Gist options
  • Save supernoveau/d19796ecb23d77d769ac14d61622dd37 to your computer and use it in GitHub Desktop.
Save supernoveau/d19796ecb23d77d769ac14d61622dd37 to your computer and use it in GitHub Desktop.
# Recursively iterate through folder
#!/bin/bash
FOLDER = ~/Desktop/Folder
for file in $(find $FOLDER -name '*.mp4'); do
echo $file # will print the full path
echo ${file##*/} # will print the filename
echo dirname $file
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment