Multi-rename files

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
HugoG
Junior Member
Junior Member
Posts: 2
Joined: 2021-10-23, 15:09 UTC

Multi-rename files

Post by *HugoG »

I would be really grateful, if somebody could help me in this topic.

How can I rename multi-files in this mode below:
Example:
1) Management by Ralph Smith.pdf
2) Project by Mario Fernández.pdf

Results:
1) Ralph Smith_Management.pdf
2) Mario Fernández_Project.pdf

So I would like to cut a certain part from filename and put at the beginning? Can I solve it or it is not possible?

Ps. Extra question: Is there any mode to mine the year of (book)publishing from a pdf. I tried to use xpdfsearch plugin, but I could find only the created date of file.

Thanks!
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: Multi-rename files

Post by *Gral »

Search & replace:
Search for:

Code: Select all

(.+) by (.+) (.+)
Replace with:

Code: Select all

$2 $3_$1
[E] off
RegEx on
HugoG
Junior Member
Junior Member
Posts: 2
Joined: 2021-10-23, 15:09 UTC

Re: Multi-rename files

Post by *HugoG »

You are great! Thank you so much
Thiago
New Member
New Member
Posts: 1
Joined: 2022-02-14, 23:58 UTC

Re: Multi-rename files

Post by *Thiago »

Hi! I have an equally complex case.
I work with software that generates an output file with the names: JOB_1_sample-file_20220211083122.txt.

The beginning of the text file is variable (JOB_1,JOB_2,JOB_3,etc).

Example: JOB_2_sample-file_20220211083122.txt, JOB_34_sample-file_20220211083122.txt, JOB_1007_sample-file_20220211083122.txt.

I need to remove the initials from the files, leaving only the 'sample' forward.

Is there such a possibility?
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Multi-rename files

Post by *Dalai »

2Thiago
In TC's MRT (opened by Ctrl+M)

Search for:

Code: Select all

JOB_\d+_
Replace with:

Code: Select all

<Clear>
(or nothing)
[X] RegEx.

But keep in mind that this might produce duplicate file names. In other words, it will only work when the files are in different directories.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply