Renaming multiple files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
grindnoise
Junior Member
Junior Member
Posts: 2
Joined: 2024-09-18, 18:00 UTC

Renaming multiple files

Post by *grindnoise »

Hi! I have files like this:
353338.jpg
353338_2.jpg
353338_3.jpg


353339.jpg
353339_2.jpg
353339_3.jpg

..etc..

And i have to rename only these, which don't have underscore to get _1 added.

So the result i want to achieve should like this:

353338_1.jpg
353338_2.jpg
353338_3.jpg


353339_1.jpg
353339_2.jpg
353339_3.jpg

Please, can you help me?
User avatar
Dalai
Power Member
Power Member
Posts: 9945
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Renaming multiple files

Post by *Dalai »

There are several ways to do this:
  1. Search for these files specifically, i.e. files without an underscore in their name. This can be done via the Plugins tab:

    Code: Select all

    tc | name | !contains | _
    After feeding the results to the listbox, select all files (Ctrl+A) and call MRT (Ctrl+M) and set the search term to

    Code: Select all

    [N]_1
  2. Select all files and call MRT (Ctrl+M) and use these settings:
    Search for:

    Code: Select all

    ^([^_]+)$
    Replace with:

    Code: Select all

    $1_1
    [ ] E
    [X] RegEx

    This replaces names which don't contain an underscore with themselves and adds "_1" at the end before the extension.
Pretty sure these are not the only ways.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
white
Power Member
Power Member
Posts: 5748
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Renaming multiple files

Post by *white »

Using Multi-rename tool:

Code: Select all

Search for:     ^\d+$
Replace with:   $0_1

☐ [E]
☑ RegEx

☐ Subst
sa16
Senior Member
Senior Member
Posts: 324
Joined: 2021-09-10, 07:15 UTC

Re: Renaming multiple files

Post by *sa16 »

Rename mask: file name
[N1-6]_1[N7-]
Search for: _1_
Replace with: _
grindnoise
Junior Member
Junior Member
Posts: 2
Joined: 2024-09-18, 18:00 UTC

Re: Renaming multiple files

Post by *grindnoise »

white wrote: 2024-09-18, 18:56 UTC Using Multi-rename tool:

Code: Select all

Search for:     ^\d+$
Replace with:   $0_1

☐ [E]
☑ RegEx

☐ Subst
Thanks a lot!
Post Reply