Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?.

share|improve this question
up vote 8 down vote accepted

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.

share|improve this answer
@Mik thanks! edited :) – carestad Nov 1 '12 at 0:48

I guess this answer to another question could help :)

Specific to the question:

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


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

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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