[prev in list] [next in list] [prev in thread] [next in thread]
List: opensuse
Subject: Re: Can you help with rename files? (a bit offtopic, sorry)
From: Knurpht-openSUSE <knurpht () opensuse ! org>
Date: 2023-12-23 14:43:31
Message-ID: 2711901.mvXUDI8C0e () lenovo-p16
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic