How can I replace characters in the file name

DId you have a look at the FAQs, /t/967/1 especially?

The example quotes "xyz" which should be the underscore in your example. And the single blank as replace string.