$ fn="/media/drive/folder/2014/06/14/name.jpg" ; \
echo "mv $fn $(echo $fn | sed -re 's,([0-9]+)/,\1-,g')"
mv /media/drive/folder/2014/06/14/name.jpg /media/drive/folder/2014-06-14-name.jpg
$ find -type f | tee LISTOFFILES.txt
$ cat LISTOFFILES.txt | while read p ; do # loop through all files, one at a time
f="${p##*/}" ; bn=${f%%\.*} ; op="${p%/*}/" ;
echo -e "$f\n$bn\n$op"
# $p - complete path to original file
# $f - filename with extension
# $bn - basename, filename without extension
# $op - orignal PATH, filename and extensions stripped off
# add your conversion here - based on the above
# mkdir -p "$p" # probably required
# mv "$p" "..." #
done
Now, if you read the above THOROUGHLY you will find all bits and pieces you need to accomplish this task.
As I cannot tell how you HAVE IT nor HOW YOU WANT IT - I cannot finish it for you.
http://www.tldp.org/guides.html
has TWO Bash guides to read and look through - have a go.
I'm leaving it here. This is not a service, I did it due to curiosity only.
And remember - there MAY be faults in there, as I have not tested it fully.
YOU may introduce faults you didn't think of... :-)
Good luck! ;-) you need it.