How to change file names in different folders?
You can run this command in Terminal:

find . -name hello.jpg -exec bash -c 'mv "$1" "${1%/*}"/"$(echo $(dirname "$1")_$(basename "$1"))"' -- {} \;


This will find all hello.jpg files inside directories and prepend dir name in front of the filename. NOTE: this search only inside current dir You're in - not the whole partition.

EDIT: fixed spaces in dir/filename.