Multi rename tool: insert dash hyphen to all files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
louwin
Member
Member
Posts: 128
Joined: 2007-06-09, 11:22 UTC
Location: Perth, Western Australia

Multi rename tool: insert dash hyphen to all files

Post by *louwin »

Really complex RegEx question :)


I apologise if this is the wrong place to post this thread/question. Maybe I should look for a RegEx forum but there are some VERY smart people on THIS forum :D

I have many folders structured thus:-

Author1
--first book title.txt
--second book title.rtf
--third book
----Title.doc
----Cover.jpg
Author2
.etc.

Is there a RegEx that will append an " - " and the Author to each book title using the Multi Rename Tool? The first 2 books are difficult enough and I suspect the third book structure is impossible?

There can be 1 to many book titles and different file types involved in each Author folder.

I also suspect that RegExs only work at one level :(

I'll be more than happy with any solution that will save me manual effort :)

I have about 400 authors and I have already done a couple of hundred manually

Thanks in anticipation :D
There are 10 types of people in the world,
Those who understand binary and those who don't.
User avatar
louwin
Member
Member
Posts: 128
Joined: 2007-06-09, 11:22 UTC
Location: Perth, Western Australia

Post by *louwin »

If not possible with RegEx I would be also be grateful for a "Batch" file solution :)
There are 10 types of people in the world,
Those who understand binary and those who don't.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You don't ever need RegEx to do such thing. :D

1. Press Ctrl+B to see all files in all author's folders.
2. Select all files and press Ctrl+M.
3. Enter name template [P] - [N] (or [N] - [P] in order to append author name after book name) and extension template [E]
4. All other parameters should be in default state (no search/replace, no case change etc).

BTW you can press F1 in MRT window and read about all supported parameters like [P]. And, you've selected right subforum.
User avatar
louwin
Member
Member
Posts: 128
Joined: 2007-06-09, 11:22 UTC
Location: Perth, Western Australia

Post by *louwin »

******* hell! (please insert expletive in place of *******) :D

What an unbeleiveable solution (and ssssooooo easy). :) :D :o :lol:

I didn't believe it while I read it! :roll:

Tried it and it works ******* perfectly!

I got a reply (by email) from White which detailed a brilliant RegEx solution but this one takes the cake!!!! :D

THANK YOU

I wish I had asked this question 200 manually renamed Authors ago :roll:

I have dome about 1200 filenames painfully manually :(
There are 10 types of people in the world,
Those who understand binary and those who don't.
User avatar
louwin
Member
Member
Posts: 128
Joined: 2007-06-09, 11:22 UTC
Location: Perth, Western Australia

Post by *louwin »

A few hours later and I'm still blown away by MVV's solution :D

I read the MRT Help and included "Series" in my renames with a

[P], [N] - [G] :D :D :D Fabulous!

So I tried to further refine my requirement.

I did a ctrl + B to "explode" and ctrl + A to "select all". Then I did a Unselect Group "*.jpg" and a Unselect Group "*.gif" as I didn't want to rename the picture files.

I then wanted to Unselect all files with a pre-existing "space-dash-space" in their filenames. I tried Unselect Group * - *.* and *" - "*.* but they just unselected ALL the files :(

How do I Unselect all the files with a pre-existing "space-dash-space" in them? :?: :oops:
There are 10 types of people in the world,
Those who understand binary and those who don't.
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

true, MVV does magic.
#181344 Personal licence
User avatar
mhe
Junior Member
Junior Member
Posts: 71
Joined: 2003-02-16, 15:09 UTC

Post by *mhe »

Try unselect group, define, write " - " in the search (with the quotes) save, use what you just saved with unselect group.
Not entirely sure if it works, just tried quickly but think it does what you need.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

louwin, try to unselect "* - *" - you need to use quotes if your mask contains a space (or TC may think that you've specified multiple masks divided by a space).
User avatar
louwin
Member
Member
Posts: 128
Joined: 2007-06-09, 11:22 UTC
Location: Perth, Western Australia

Post by *louwin »

Brilliant.

Thanks MVV and mhe

Now I can refine my file selection before the final rename :D
There are 10 types of people in the world,
Those who understand binary and those who don't.
Post Reply