I have some code snippets that can do what I want, but would like to be able to combine them together. I have a large number of files backed up (@ 250gb) that need sorting by file type. I would like to be able to search the whole fileset, which is many many sub directories deep, for a particular filetype, and then move them to a new location.

1st snippet
Code:
EXTS="jpg"; for ext in $EXTS; do mkdir $ext; mv  *.${ext} $ext; done
This will find all files with extension jpg and create a directory before moving them all over. (It is possible to add more extensions to the variable to further automate, but I will probably be happy to run one at a time). I need to avoid overwriting duplicates and I understand I can add a switch to mv for this:

2nd snippet
Code:
mv --backup=numbered
My problem is that this 1st snippet only covers the first directory down. I know about using find to move all files to a different location:

3rd snippet
Code:
find ~/[target folder] -type f -exec mv {} ~/[destination folder] \;
How do I go about combining, or using the intent from the 3 snippets to achieve what I am after. Also, for testing purposes, how would the same thing be done using cp?

Thanks in anticipation