Cut sub-string and rename files use shell command -
this question has answer here:
- how rename prefix/suffix? 7 answers
how rename file names? want map names:
abc-hdpi.png ⟶ abc.png bcd-hdpi.png ⟶ bcd.png
...
i have many files this, mv abc-hdpi.png abc.png
not solution.
search prename
(perl rename
) command; can job easily:
prename 's/-hdpi.png/.png/' *-hdpi.png
failing that:
for file in *-hdpi.png mv "$file" "${file%-hdpi.png}.png" done
Comments
Post a Comment