Add to rname features to delete name of parent etc. from filenames

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
bibliomusic
Junior Member
Junior Member
Posts: 2
Joined: 2020-08-09, 22:16 UTC

Add to rname features to delete name of parent etc. from filenames

Post by *bibliomusic »

I suggest to add to multirename feature and elsewhere the ability to delete the name of parent, grandparent, etc. from file name or folders. This could make file names simpler if they didn't have the repetition of information from their path embedded in the file name. I have a library of television programs and films, and I'd like to make the episode titles simpler if the name of the folder is the name of the program, for example.
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Add to rname features to delete name of parent etc. from filenames

Post by *Stefan2 »

2bibliomusic

Hi and welcome.

Please provide before/after examples of that what you mean.


BEFORE:
D:\rive\Path\Foldername\filename.ext
D:\rive\Path\Foldername\filename.ext
D:\rive\Path\Foldername\filename.ext


AFTER:
D:\rive\Path\Foldername\filename.ext
D:\rive\Path\Foldername\filename.ext
D:\rive\Path\Foldername\filename.ext




 
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Add to rname features to delete name of parent etc. from filenames

Post by *white »

In Multi-Rename Tool:

Remove name of parent folder from the filename:

Code: Select all

File mask:     [P]\[N]

Search for:    ^(.*)\\((.*?)\1)?
Replace with:  $3

RegEx:         Enabled
Add \s* in front of and/or behind \1 if you also want to remove leading and/or trailing spaces.


Remove name of grandparent folder from the filename:
* same but use {G} instead of [P]
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Add to rname features to delete name of parent etc. from filenames

Post by *Hacker »

Stefan2,
Please provide before/after examples of that what you mean.
I assume the request is for a simple way to get from there:

Code: Select all

C:\ABBA\1989\Greatest Hits\ABBA - 1989 - Greatest Hits - Waterloo.mp3
to here:

Code: Select all

C:\ABBA\1989\Greatest Hits\Waterloo.mp3
or similar.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: Add to rname features to delete name of parent etc. from filenames

Post by *Fla$her »

Replace with: $3
It's unnecessary.

Rename mask: [P]\[N]
Search for: ^([^\\]+)\\\1\s*
RegEx
Overquoting is evil! 👎
Post Reply