Following this question I exported various SVGs to PNGs, but there is a little problem, all files include in their name the extensions .svg and .png as in file.svg.png.

Now what I'd like to know is how can I remove the .svg string from the name of the file without going trough each file and do right-click>rename?.


pyrenamer is a pretty handy tool for batch renaming files. Otherwise, you could always fire up the terminal.

for file in *; do mv "${file}" "${file//\.svg/}"; done

That should do the trick if you're in the same directory as the pictures. Use at own risk.


I guess this answer to another question could help :)

Specific to the question:

rename s/".svg"/""/g *


rename s/"**TO-BE-REPLACED**"/"**REPLACEMENT**"/g *

  • Thunar's rename tool is pretty much what I wanted yes, it helped. I wiil up-vote you as you lead me to it but not exactly solved it ;) perhaps you should add it. – Uri Herrera Oct 31 '12 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.