Skip to content

Instantly share code, notes, and snippets.

@LongYC LongYC/copyflat.sh
Last active Jun 13, 2018

Embed
What would you like to do?
Copy all files with specified extension from a source directory and its subdirectories into a destination directory.
# chmod 755 copyflat.sh
# ./copyitune.sh m4a /my/iTune/ /my/destination/
# $1 = file extension.
# $2 = source directory.
# $3 = destination directory.
echo "Copy all $1 files in $2 to $3"
find $2 -name "*.$1" -exec cp {} $3 \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.