[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse
Subject:    Can you help with rename files? (a bit offtopic, sorry)
From:       Daniel Bauer <linux () daniel-bauer ! com>
Date:       2023-12-23 14:38:33
Message-ID: 1afe6791-a69b-4836-a557-4f9390bf0538 () daniel-bauer ! com
[Download RAW message or body]

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

-- 
Daniel Bauer photographer Basel Málaga
Twitter: @Marsfotografo (often explicit nudes)
https://www.patreon.com/danielbauer
https://www.daniel-bauer.com (nudes)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic