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

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

MMFrLife
Posts: 2807
Joined: Fri Oct 26, 2012 9:04 pm

Re: RegEXP: Take "Last Modified"-Attribut as "Date"-Value

Post by MMFrLife »

So, you are actually talking about the timestamp, but you only want the date 'part/aspect' of the Timestamp, not the time?

If so, I don't remember the preset/functionality details of the regular version, but there is a preset in the enhanced version
called - 'Specific manipulations: Assign date/time when file is created to Timestamp field' [Description: Timestamp is thedate/time when a file is last modified].

The Enhanced version also has the ability to 'batch' presets together so as to behave like several are one.
You could copy the date aspect to one field and then to the date with a single batch.

* It may be that there should be a preset in between to deal with the timestamp's format of the date ' / / ' allowing
it to fit into the date field (date field is very strict in what it allows). I did some changing of timestamps a long time ago and
remember something about having to alter format.

If you could confirm what you mean, as a numbered sequence, it would help.
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
others: Adv. Dup. Find & Fix and Backup 6.0, but buggy || software for power users: "Q-Dir"
(free alt. to explorer) and file/folder renamer- "ReNamer" (den4b)
MMW 4.1.31.1919; ...back it up...frequently!
ZvezdanD
Posts: 3165
Joined: Thu Jun 08, 2006 7:40 pm

Re: RegEXP: Take "Last Modified"-Attribut as "Date"-Value

Post by ZvezdanD »

Archiv-Cowboy wrote: Sun May 30, 2021 9:46 am I want mass copy the "Last Modified" property of video files (but only the date not the timestamp) for the "date" value in Media Monkey. I've found a preset for the creation date, but the files are copies so the creation date of the files isn't when the clips are taken, but the modified date is it.
The last modified property of files is called Timestamp in MM and RFR. However, I am not sure if that field is automatically updated in the MM database if you change files outside of MM.
Archiv-Cowboy wrote: Sun May 30, 2021 9:46 am other Problem: I can't automatically copy this value in the "date" field directly. I get an error-message, I think because the preset includes the timestamp and the "date" value-field can't process this.

So I would ask if their is there another way to obtain, what I want?
Find what: ^.*
Into: Date
RegEx1: on
Replace with: DateISO(<From Field>)
From: Timestamp
VBScript: on
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
MMFrLife
Posts: 2807
Joined: Fri Oct 26, 2012 9:04 pm

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

Post by MMFrLife »

Is there a preset where you can indicate a specified string
to replace a folder level?

I'm looking for simplicity. A 'single' preset where you 'only' need to indicate
the folder level and a new string, not the folder level as a string to be replaced.

Folder level: 2

String: The Best Group


results in the following path,

F:\AMI.A1\That Wonderful Band\Successful Album\This Song Rocks.flac

being changed to,

F:\AMI.A1\The Best Group\Successful Album\This Song Rocks.flac
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
others: Adv. Dup. Find & Fix and Backup 6.0, but buggy || software for power users: "Q-Dir"
(free alt. to explorer) and file/folder renamer- "ReNamer" (den4b)
MMW 4.1.31.1919; ...back it up...frequently!
ZvezdanD
Posts: 3165
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

MMFrLife wrote: Sat Jul 03, 2021 1:01 am Is there a preset where you can indicate a specified string
to replace a folder level?
Maybe you could use the preset "Assign <From Field> to left-specified folder level of Path..." with:
Replace with: "$1" & IIf(Len("<String Caption="New folder name" Value="The Best Group" ID=1>"), "<ID:1>", "$2")
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
MMFrLife
Posts: 2807
Joined: Fri Oct 26, 2012 9:04 pm

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

Post by MMFrLife »

Thanks!
That is the idea, but I prefer, 'right-specified' Folder Level for current needs (in the generic example above I used FL2, more
specifically, it's FL1).

I altered the beginning of,
"$1" & IIf(Len("<String Caption="New folder name" Value="The Best Group" ID=1>"), "<ID:1>", "$2")
to,
"" & IIf(Len("<String Caption="New folder name" Value="The Best Group" ID=1>"), "<ID:1>", "$2")
and it works!

But that's not proper syntax, is it?
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
others: Adv. Dup. Find & Fix and Backup 6.0, but buggy || software for power users: "Q-Dir"
(free alt. to explorer) and file/folder renamer- "ReNamer" (den4b)
MMW 4.1.31.1919; ...back it up...frequently!
ZvezdanD
Posts: 3165
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

MMFrLife wrote: Sat Jul 03, 2021 11:23 am But that's not proper syntax, is it?
I suppose it works only in that specific case. You could try modifying the preset "Assign <From Field> to right-specified folder level of Path..." with:
IIf(Len("<String Caption="New folder name" Value="The Best Group" ID=1>"), "<ID:1>", "$1")
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
MMFrLife
Posts: 2807
Joined: Fri Oct 26, 2012 9:04 pm

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

Post by MMFrLife »

Okay, that works. It looks cleaner too.
I originally tried that at the 'beg' of RW and it cut out literally everything to the left of the
targeted FL, including its left-side slash.

The key is to also alter the end of RW to $1. Got it.

In regard to '$1' and '$2' at the end, does each one represent the two ends of the path?
Where, '$' is an end and the number is which end (2 is the left-side end and 1 is the right-side end) ?
I suppose it works only in that specific case.
Yeah, originally, I thought it might have something to do with the fact that the generic example's folder level
is the same either way since there are only 3 levels. But, interestingly, it still works to count from the right even when you
change the folder level. Oh well :D
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
others: Adv. Dup. Find & Fix and Backup 6.0, but buggy || software for power users: "Q-Dir"
(free alt. to explorer) and file/folder renamer- "ReNamer" (den4b)
MMW 4.1.31.1919; ...back it up...frequently!
ZvezdanD
Posts: 3165
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

MMFrLife wrote: Sat Jul 03, 2021 12:53 pm In regard to '$1' and '$2' at the end, does each one represent the two ends of the path?
Where, '$' is an end and the number is which end (2 is the left-side end and 1 is the right-side end) ?
No, the "$1" and "$2" represent strings for replacements of capturing groups in the regular expressions. You could click on the "?" button to get the Quick RegEx Reference mentioning that.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
MMFrLife
Posts: 2807
Joined: Fri Oct 26, 2012 9:04 pm

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

Post by MMFrLife »

How do I get 'Capitalize with exceptions' preset to recognize something like,

Don'T or don'T > Don't or don't
Won'T or won'T > Won't or won't
Didn'T or didn'T > Didn't or didn't
and so on.....
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
others: Adv. Dup. Find & Fix and Backup 6.0, but buggy || software for power users: "Q-Dir"
(free alt. to explorer) and file/folder renamer- "ReNamer" (den4b)
MMW 4.1.31.1919; ...back it up...frequently!
ZvezdanD
Posts: 3165
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

"Don'T or don'T > Don't" already works with the mentioned preset (unless you messed with it), "don'T > don't" is not capitalization, and so on.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
MMFrLife
Posts: 2807
Joined: Fri Oct 26, 2012 9:04 pm

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

Post by MMFrLife »

ZvezdanD wrote: Sat Jul 03, 2021 4:12 pm "Don'T or don'T > Don't" already works with the mentioned preset (unless you messed with it), "don'T > don't" is not capitalization, and so on.
Ah ha!
Turns out it was oddly a kind of accent character by itself positioned similar to an apostrophe.
I knew it should have worked because I've encountered the normal apostrophe version (...'T) a time or two in the past.

Thanks for reminding me it should work.
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
others: Adv. Dup. Find & Fix and Backup 6.0, but buggy || software for power users: "Q-Dir"
(free alt. to explorer) and file/folder renamer- "ReNamer" (den4b)
MMW 4.1.31.1919; ...back it up...frequently!
ZvezdanD
Posts: 3165
Joined: Thu Jun 08, 2006 7:40 pm

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

Post by ZvezdanD »

MMFrLife wrote: Sat Jul 03, 2021 5:33 pm Turns out it was oddly a kind of accent character by itself positioned similar to an apostrophe.
You could use the preset "Replace acute and grave accents with apostrophes in <Into Field>..." to find or replace such characters.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
MMFrLife
Posts: 2807
Joined: Fri Oct 26, 2012 9:04 pm

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

Post by MMFrLife »

ZvezdanD wrote: Sun Jul 04, 2021 12:04 am "Replace acute and grave accents with apostrophes in <Into Field>..."
Oh yeah!
I've seen that one before but didn't think I would ever use it.
I will slip it into one of my general processing batches when I get a second.
I have one that is almost entirely replacements of various symbols, punctuation, illegal characters,
caps w exc., etc.

Thanks again!
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
others: Adv. Dup. Find & Fix and Backup 6.0, but buggy || software for power users: "Q-Dir"
(free alt. to explorer) and file/folder renamer- "ReNamer" (den4b)
MMW 4.1.31.1919; ...back it up...frequently!
ezdropper
Posts: 18
Joined: Wed Sep 12, 2007 2:15 am

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

Post by ezdropper »

Is it possible to make a preset to change the date added to the album year?
MMFrLife
Posts: 2807
Joined: Fri Oct 26, 2012 9:04 pm

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

Post by MMFrLife »

ezdropper wrote: Fri Jul 09, 2021 6:05 pm Is it possible to make a preset to change the date added to the album year?
If you are just talking about changing the Date field,
you could try preset- Basic Manipulations: Assign specified string to <Into Field>...

And there is always MM properties.
MM user since 2003 (lifetime lic. 2012) "Trying to imagine life without music gives me a headache"
Top 2 scripts: RegExp Find & Replace (e.v.) and Magic Nodes (e.v.) ZvezdanD's scripts site
others: Adv. Dup. Find & Fix and Backup 6.0, but buggy || software for power users: "Q-Dir"
(free alt. to explorer) and file/folder renamer- "ReNamer" (den4b)
MMW 4.1.31.1919; ...back it up...frequently!
Post Reply