Multi-Rename Pattern for removal of everything after a certain word

Discussion, questions and support.
Post Reply
Message
Author
Forez
Posts: 472
Joined: 30.01.2016, 11:05
Location: In front of a PC monitor

Multi-Rename Pattern for removal of everything after a certain word

#1 Post by Forez » 18.09.2020, 12:39

I would like to have in Profiles of my Multi-Rename window an action than would remove everything from the filename after a certain word- assuming of course that this word would appear in the treated filename

For example a set of files like that

Code: Select all

01 Name of some file
02 Name of some file - Copy
03 Name of some file - Copy (2)
101 Name of some file - Copy - Copy
1001 Name of some file -   something
99999 Name of some file - SOMETHING ELSE
should be turned into into / left alone as

Code: Select all

01 Name of some file
02 Name of some file
03 Name of some file
101 Name of some file
1001 Name of some file -   something
99999 Name of some file - SOMETHING ELSE
So in this example the marker / trigger is

Code: Select all

 - Copy
which is to be removed along with everything that follows it



Can anyone provide me with a code for that, please?

User avatar
Dreamer
Site Admin
Posts: 4117
Joined: 19.08.2007, 21:40

Re: Multi-Rename Pattern for removal of everything after a certain word

#2 Post by Dreamer » 18.09.2020, 19:30

File name:

Code: Select all

[n]
Search for:

Code: Select all

 - Copy*
Replace with:

Forez
Posts: 472
Joined: 30.01.2016, 11:05
Location: In front of a PC monitor

Re: Multi-Rename Pattern for removal of everything after a certain word

#3 Post by Forez » 24.09.2020, 15:58

Dreamer wrote:
18.09.2020, 19:30
File name:

Code: Select all

[n]
Search for:

Code: Select all

 - Copy*
Replace with:
Thank you, this works


But:

A] It also wipes out the extension of the file, as the extension is at the end. And I would like to retain it- assuming there is one [sometimes the files will be extension-less]

B] Although such search query is stored with the settings [and so is available from a drop down list] it will be wiped out when I decide to clean off all the fields by using

Command > Clear history

and I do do clean the fields every couple of weeks when they get cluttered with various expressions



So how can this be "translated" into conditional formatting to be used as a permanently stored entry within the Profiles tab?
Last edited by Forez on 15.10.2020, 18:52, edited 1 time in total.

User avatar
alf5000
Posts: 489
Joined: 12.04.2012, 15:59
Location: Austria

Re: Multi-Rename Pattern for removal of everything after a certain word

#4 Post by alf5000 » 24.09.2020, 17:36

try this:

Image
(win7pro x64) - (FCXE x64) - (15"screen) - (resolution: 2880-1620) - (DPI scaling: 200%)

User avatar
Dreamer
Site Admin
Posts: 4117
Joined: 19.08.2007, 21:40

Re: Multi-Rename Pattern for removal of everything after a certain word

#5 Post by Dreamer » 24.09.2020, 18:31

A) I think the option "Exclude extension" should be enabled by default, in most case it's not needed to process extension. BTW this option works.

B) If I create a profile with "replace with" entry, it's saved correctly, and when I use this profile once, it's added to drop-down menu, I think it works good, if it's not what you want, please create a new topic, if you think it's a bug, use Bug reports forum, just please - 1 issue per topic.

Forez
Posts: 472
Joined: 30.01.2016, 11:05
Location: In front of a PC monitor

Re: Multi-Rename Pattern for removal of everything after a certain word

#6 Post by Forez » 15.10.2020, 18:57

Yes this works now as I need it to

And I simply forgot that all I have to do is to switch to Profiles and click the green "+" icon in order to see a creation of a profile working in a way established in the Settings window



So thank you as I think that this is all I need. This will save me a lot of time in the coming years and reduce the amount of clicks

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests