As you're on Linux, just use the command "rename" instead. rename 's/_/ /g' name/of/directory/Dragonball_z* If you stand in the directory where you wish to rename, and you want this to process all files, a simple * will do (no need to print out the path and the start of the filename). If your ...