Page 1 of 1

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

Posted: 18.09.2020, 14:39
by Forez
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?

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

Posted: 18.09.2020, 21:30
by Dreamer
File name:

Code: Select all

[n]
Search for:

Code: Select all

 - Copy*
Replace with:

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

Posted: 24.09.2020, 17:58
by Forez
Dreamer wrote:
18.09.2020, 21: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?

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

Posted: 24.09.2020, 19:36
by alf5000
try this:

Image

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

Posted: 24.09.2020, 20:31
by Dreamer
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.

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

Posted: 15.10.2020, 20:57
by Forez
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