On zaterdag 23 december 2023 15:38:33 CET Daniel Bauer wrote:
Hi,
I have lots of files named like 07X55c_IMG_0155.png where 07X55c is a random text of varable lengths which I want to cut so that the file will be renamed to IMG_0155.png
In my simple-mindedness I just opened mc, selected all the files and typed in the rename dialog replace *IMG* by IMG*
The result though, as you for sure knew (but me only now) were files named like IMG07X55c_ - not what I expected :-(
No need to say, but anyway: I have not the slightest idea of regular expressions and such sophisticated things, so that I kindly ask you for your help:
how can I rename all files in a directory, cutting off the variable length part before "IMG" and keeping all the rest on the right side of IMG unchanged.
Thanks for making me a little bit more enlightened!
Daniel There's krename, that did the job for me in similar renaming actions.
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board openSUSE Forums Team