MRT: Multirenamen-Tool: Transpose and Rename FOLDERS

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Alonzo Mosley
Junior Member
Junior Member
Posts: 61
Joined: 2018-03-28, 20:13 UTC

MRT: Multirenamen-Tool: Transpose and Rename FOLDERS

Post by *Alonzo Mosley »

Dear Internet:

I have a bunch of folders that are named:

GENERIC NAME (MM-DD-YYYY)

Trouble is, they weren't modified in chronological order, so you can't Sort by Date and put them in order. And because it's month first, when you sort by name, you get
GENERIC NAME (02-01-2017)
GENERIC NAME (02-01-2018)
GENERIC NAME (02-01-2019)
GENERIC NAME (02-02-2017)
etc.

So, What I'd LIKE to do, is rename the folder to:
YY-MM-DD GENERIC NAME

I know there's a way (I can't find it, though) to do something like that with files, but how to please with folders?

Thanks in advance!

rjb
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

MRT: swap timestamp folder name / date MM-DD-YYYY > YY-MM-DD

Post by *Stefan2 »

FROM:
GENERIC NAME (MM-DD-YYYY)
GENERIC NAME (12-31-1999)

TO:
YY-MM-DD GENERIC NAME
99-12-31 GENERIC NAME

DO:
-select your folders
-press Ctrl+M to open Multirenamen Tool
-Search: (.+)\s\((\d\d)-(\d\d)-\d\d(\d\d)\)
-Replace: $4-$2-$3 $1
☑RegEx




HTH? :D
Alonzo Mosley
Junior Member
Junior Member
Posts: 61
Joined: 2018-03-28, 20:13 UTC

Re: Transpose and Rename FOLDERS

Post by *Alonzo Mosley »

Thanks. Away from my external HD right now, will try in a bit.

But if you have a second, explain the process there? (I'm always hesitant to just experiment with Multi Rename to "figure things out")
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Transpose and Rename FOLDERS

Post by *Stefan2 »

Alonzo Mosley wrote: 2019-07-10, 22:29 UTC explain the process

I use Regular expressions to match wanted signs,
group the match in (...) capture groups (counted and named from left $1,$2,..)
and re-order that matches in the replacement.


FROM:
GENERIC NAME (MM-DD-YYYY)
TO:
YY-MM-DD GENERIC NAME
-Search: (.+)\s\((\d\d)-(\d\d)-\d\d(\d\d)\)
-Replace: $4-$2-$3 $1
☑RegEx

Pattern(.+)\s\((\d\d)-(\d\d)-\d\d(\d\d)\)
MatchEvery thing tilla spaceliteral open brackettwo digitshyphentwo digitshyphentwo digitstwo digitsclose bracket
FindGENERIC NAME   (MM-DD-yyYY)
Store as$1$2$3$4


Replace by $4-$2-$3 $1
YY-MM-DD GENERIC NAME



More info at:
- Ctrl+M
- F1
- Scroll to line with "RegEx Now supports"
- and click at "regular expressions"


Or just ask.

HTH? :D
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Transpose and Rename FOLDERS

Post by *Dalai »

Alonzo Mosley wrote: 2019-07-10, 22:29 UTC(I'm always hesitant to just experiment with Multi Rename to "figure things out")
Why? That's what the column "New name" is for - it gives a preview of what the names will look like when you hit "Start".

Also, it should be easy to rename copies of the real files first, so if anything goes wrong, you can start from scratch.

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
User avatar
vdijken
Member
Member
Posts: 181
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: Transpose and Rename FOLDERS

Post by *vdijken »

1) You can select the folders first to be sure that the rename only is done for those folders or relocate the files temporary to a safe place.
2) Make in a temporary folder (a few ) empty folders with the same name and try it. And copy them before to another temporary location so you can easily repeat your action by copying the second set to the first set. Actions of rename are remembered by the rename tool.
3) You can always recall a rename action.
Alonzo Mosley
Junior Member
Junior Member
Posts: 61
Joined: 2018-03-28, 20:13 UTC

Re: Transpose and Rename FOLDERS

Post by *Alonzo Mosley »

Stefan2 wrote: 2019-07-11, 07:09 UTCHTH? :D
Every time I try to figure out how to do something in MRT, I give up Googling after four or five hits and come back to this post.

So, yeah, your HTH - you H'ed correctly, it definitely H'ed.

One more question - How do I "combine" RefEx with other stuff? In other words, I have files that are titled "B01 - File Name", "B02 - Different File Name", etc. etc.

Do I have to eliminate the "B" in a non-RegEx rename, and then "(/d/d)" in a RegEx rename, and then the " - " in another non-RegEx?
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: MRT: Multirenamen-Tool: Transpose and Rename FOLDERS

Post by *gdpr deleted 6 »

Do you only want to eliminate the first character when it is a "B", or do you generally want to eliminitate the first character regardless of it being a B?

If you want to eliminate the first character no matter whether it is B or another character: In the file name field, use [N2-]
(you can use this also in conjunction with some Search & Replacement)


To replace the first character only when it is a B, use regex search & replacement like:
Search: ^B?(.+)
Replace: $1

(you can substitute the "(.+)" with any other regex term and an according Replace term if you want to replace/eliminate more than just the starting "B")

If you struggle with regex syntax, just google for "regex tutorial" or "regular expression tutorial". You _will_ get search results with a number of different regex tutorials. Choose one or a few that you feel most comfortable with and is easy for you to follow. If you don't like one particular tutorial you started with, don't hesitate jumping ship and follow another tutorial instead... ;)
(My suggestions is always https://www.regular-expressions.info/tutorial.html, but that's just because i am lazy. Note that this particular tutorial also covers advanced regex features not supported by TC. Anyway, if you happen to find it sucky, as i said, don't hesitate and use another tutorial instead.)
Last edited by gdpr deleted 6 on 2020-08-18, 18:32 UTC, edited 3 times in total.
Alonzo Mosley
Junior Member
Junior Member
Posts: 61
Joined: 2018-03-28, 20:13 UTC

Re: MRT: Multirenamen-Tool: Transpose and Rename FOLDERS

Post by *Alonzo Mosley »

Yes, it's specifically a "B".

I have "B01-01-Master File Name", "B01-02-Master File Name", "B01-0n-Master File Name", up to and including "B12-01-Twelfth Master Name". So I think I know once I get rid of all of the "Bxx" how to take care of stuff. We'll see!

And I do struggle with *all* syntax. Not just RegEx.

Thanks!
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: MRT: Multirenamen-Tool: Transpose and Rename FOLDERS

Post by *gdpr deleted 6 »

As a side note: If you find defining the search and replacement patterns too difficult, and you feel more like a text editor warrior, you might perhaps prefer doing some file name editing in the text editor of your choice.

To do so, click on the button underneath the "?" button (screenshot to make it easier for you to locate the button: https://imgur.com/a/IGWxmFn) and select "Edit names..." from the menu.
Alonzo Mosley
Junior Member
Junior Member
Posts: 61
Joined: 2018-03-28, 20:13 UTC

Re: MRT: Multirenamen-Tool: Transpose and Rename FOLDERS

Post by *Alonzo Mosley »

Oh that looks dangerous.
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
Post Reply