RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Post a reply

Visual Confirmation

To prevent automated access and spam, you are required to confirm that you are human. Please place a check mark next to all images of monkeys or apes. If you cannot see any images, please contact the Board Administrator.

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [MM2+]

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by Hdhntr23 » Tue May 26, 2015 9:28 pm

Thanks to everyone thats answered my questions. I really appreciate it.

One thing Im noticing is that when I make a change to a song title (As I mentioned I am currently trying to capitalize every first letter of every word on 40K+ files) is that the text in the path doesnt change with the edits... Not a HUGE deal but Im wondering if it should?

I have read the first post and have it in a word doc that I have opened in as Im doing my edits but I still can not for the life of me figure out how to only show the files that are up to edit vs. ALL of my files. I think it has something to do with the check boxes on the left of the titles as well as one of those button options in the lower left "keep matched" etc...

Its KILLING me that I can't figure this part out. ANY help would be very much appreciated.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Sun May 24, 2015 3:35 pm

I tried the last (simplest) one and it worked brilliantly!
...and all that without knowing an exact path. You da man Z! 8)
Big Thanks!

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by ZvezdanD » Sun May 24, 2015 1:05 pm

MMFrLife wrote:So, by an example, you'd need me to literally write out the entire path? You can't write it with a starting position signifier?

Yes, I needed the entire path as an example. For example, if I have:
c:\My Music\Rock\The Beatles\The Beatles [White Album]\Disc1\01 - Back in the U.S.S.R..mp3
I want to move prefixes only on the third level of sub-folders ("The Beatles" -> "Beatles, The"), but I don't want to apply it on the forth level ("The Beatles [White Album]" -> "Beatles [White Album], The").

The folders in the path have a starting position signifier which is "\", but it is same for every sub-level of folders, even for the fourth level which in my example represents the name of the album, so you cannot use it in general.

You need some specific preset which deals with the particular level of sub-folders. For example, there are several presets which manipulate the last (rightmost) sub-folder of the path, e.g. "Append weighted average Bitrate of album to the last folder of Path".

If you have some spare Custom field, you could use it as an intermediate storage for your need, using 3 presets one after another. The first two presets already exist: "Assign specified folder level of Path to <Into Field>..." and "Move prefixes to the end of <Into Field>..." specifying that Custom field in the Into combo box. The third preset is new and it would be the opposite of the first one:

Preset: Assign <From Field> to specified folder level of Path ...
Description: If specified value = 3, Beatles, The (specified field) and c:\My Music\Rock\The Beatles\Let It Be.mp3 (old Path) -> c:\My Music\Rock\Beatles, The\Let It Be.mp3 (new Path)
Find what: ^((?:[^\\]+?\\){<Number Caption="Folder level" Value="3">})([^\\]+)((?:\\[^\\]+){1,})
Into: Path
Regular expression 1: checked
Replace with: "$1" & <From Field> & "$3"
From: e.g. Custom 1
VBScript expression: checked

Of course, in case if you already have the artists in the form with the prefixes on the end stored in some field (e.g. Custom x), then you could skip first two mentioned presets and just use the third one.

Or, you could simply use just this preset:

Preset: Move prefixes to the end of specified folder level of Path...
Description: If specified value = 3, c:\My Music\Rock\The Beatles\Let It Be.mp3 -> c:\My Music\Rock\Beatles, The\Let It Be.mp3 (Path)
Find what: ^((?:[^\\]+?\\){<Number Caption="Folder level" Value="3">})([^\\]+)((?:\\[^\\]+){1,})
Into: Path
Regular expression 1: checked
Replace with: "$1" & RegSub("$2", "(^|;\s*)(The|A|An)(\s+)(.+?)(?=$|;\s*)", "$$1$$4,$$3$$2") & "$3"
VBScript expression: checked

Please be extremely careful when using this add-on with the Path specified as Into field (or any derived field as Folder, Filename and Extension)!

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Sun May 24, 2015 10:53 am

The pages don't change automatically (changes are made on all of them, though). I'm not sure about the "keep" stuff, as I don't use it.
I'm sure it is discussed in the Intro. "Replace" and "Replace all" are dependent on what tracks you have checked.
You should print out the intro and make highlights and notes of things for future reference.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by Hdhntr23 » Sun May 24, 2015 10:46 am

so once Im done with the yellow edits on one page if I click on "find next" it wont automatically go to the next page?

Can you explain what "keep matched" and keep to replace, and all those button options mean in the lower right hand corner?

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Sun May 24, 2015 10:35 am

There should be some arrows/page info at the bottom left

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by Hdhntr23 » Sun May 24, 2015 10:22 am

Great thanks!

Ive got it pulled up and Ive fixed a couple but how do I:

1) keep the file the way it is vs. fixing it and go to the next one

2) make the page move to the next "yellow" one vs. it staying on page one?

Thank you so much in advance!

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Sat May 23, 2015 8:37 pm

#234 if you want all words capitalized.
#235 if you only want major words capitalized.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by Hdhntr23 » Sat May 23, 2015 8:24 pm

I'm sure this has been asked before but I coudlnt find it in this thread... 67 pages wow!

Anyway, is there a preset to capitalize every first letter of each word in a field?

I apologize if this is an easy one.

Thanks in advance.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Sat May 23, 2015 8:19 pm

ZvezdanD wrote:I didn't say that you cannot do it, but I said that you cannot use the mentioned preset for that.

I understood you (the gist). That's what I meant by can't do it. Not that it isn't possible, just not with current presets.

ZvezdanD wrote:As I said, I need examples. I cannot write a new preset for you if I don't know what exactly you want. It is not same if some folder is on the first or second or any other level of the path

So, by an example, you'd need me to literally write out the entire path? You can't write it with a starting position signifier? [not complaining, just wondering if that's
what you're saying, specifically]

ZvezdanD wrote:But, you are right, maybe it would be faster if you just use some specialized software for that.

Yeah, in this case I'd rather just use my FileRenamer (file and folder) and save your efforts for a couple of other issues I want to try and get to after
the next few days.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by ZvezdanD » Sat May 23, 2015 5:52 pm

MMFrLife wrote::( Yeah, you hit on what I want.
So, it looks like I can't do it since "The Fifth Dimension" folder is not at the beginning of the path
and it isn't separated by ";" inside of a field.

I can use my FileRenamer for them. It's a really great one (by Sherrod). :)

I didn't say that you cannot do it, but I said that you cannot use the mentioned preset for that. As I said, I need examples. I cannot write a new preset for you if I don't know what exactly you want. It is not same if some folder is on the first or second or any other level of the path, unless if you want to move prefixes in the folder only for just that single artist. In that case you could simply use this add-on by replacing:
\The Fifth Dimension\
with:
\Fifth Dimension, The\

But, you are right, maybe it would be faster if you just use some specialized software for that.

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Sat May 23, 2015 5:28 pm

:( Yeah, you hit on what I want.
So, it looks like I can't do it since "The Fifth Dimension" folder is not at the beginning of the path
and it isn't separated by ";" inside of a field.

I can use my FileRenamer for them. It's a really great one (by Sherrod). :)

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by ZvezdanD » Sat May 23, 2015 10:57 am

MMFrLife wrote:How do I get it to look for a specific folder in the path?
Trying to rename "Prefix to end of <into>" (for the artist folder).

I know the proper preset to use, but folder and path do not work as is.
What am I not seeing?

You should be more specific with some examples what you have now and what you want to get. Also, there is no "Prefix to end of <into>" preset and I am not sure that I know about which you are talking. I suppose it is "Move prefixes to the end of <Into Field>...", but you cannot use that preset since it is moving prefixes from the begin of the specified field to its end.

For example, if I have artist "The Beatles" I could get "Beatles, The". However, if I have this path:
c:\My Music\Rock\The Beatles\The Beatles [White Album]\Disc1\01 - Back in the U.S.S.R..mp3
then the Folder would be:
c:\My Music\Rock\The Beatles\The Beatles [White Album]\Disc1
i.e. everything except the filename and extension (01 - Back in the U.S.S.R..mp3). In both cases the prefix is not on the begin of the string. Actually, the mentioned preset could move prefixes even if they are not on the begin of the string, but they should be preceded with the multi-item separator ";". For example: "Bob Marley; The Wailers" would be "Bob Marley; Wailers, The".

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by MMFrLife » Sat May 23, 2015 8:26 am

How do I get it to look for a specific folder in the path?
Trying to rename "Prefix to end of <into>" (for the artist folder).

I know the proper preset to use, but folder and path do not work as is.
What am I not seeing?

Re: RegExp Find & Replace 4.3 w/ 253 presets (2011-07-06) [M

Post by terrypin » Sun May 17, 2015 1:58 am

Yes, I sorted alphabetically following the tip from ZvezdanD on 9th May up-thread:
viewtopic.php?f=2&t=28510&start=975#p407701

But to do the same for the Tools > Scripts dropdown, lke you I resorted to manual shuffling after nohitter's pointer about editing Scripts.ini:
viewtopic.php?f=2&t=80768#p407398

Top