# method 1 (from the beggining of filename)
rename.ul filename_foo filename_bar *.png
# method 2 (replace some portion of filename)
for filename in *foo*; do echo mv "$filename" "${filename//foo/bar}"; done > rename.txt
# check commands then
for filename in *foo*; do echo mv "$filename" "${filename//foo/bar}"; done | /bin/bash