RegExp Find and Replace
- MediaMonkey Add-on - by Zvezdan Dimitrijević
This add-on works with MediaMonkey v2.x-4.x. It allows powerful finding and replacing of strings inside of selected/visible tracks in the main tracklist or the Now Playing panel. The matching criteria and the replacement string can be created using Regular expressions or VBScript expressions which provides very flexible transformations of data. It has a support for custom presets with 253 already predefined, for example: clear field, copy conditionally full or part of one field to another, swap the first and the last name of Artist, ... Almost all MM fields are supported!
Although this add-on is so flexible and powerful, using the predefined presets is almost trivial: just select the tracks that you want to modify, choose the needed preset from the Edit > RegExp Find & Replace > Tags Manipulation Presets menu and adjust the fields/values if that is necessary. Just take a look how simple it could be:
Well, that could be even simpler: you could turn on the Toolbar button check box for the needed preset using the Preset Settings dialog box, click on the Update button and after that you could apply that preset to the selected tracks just with single click on the new toolbar button instead to dig for the needed preset in the overcrowded list of presets. If you prefer keyboard, you could specify Shortcut for the needed preset, e.g. Ctrl+T and you would get modified tracks by the press on that keyboard hotkey.
For a discussion about this add-on, you could visit its related MediaMonkey forum thread. If you are using some skin which is not supported by default, you could take a look of skin styles for this add-on made by nynaevelan at the next forum thread.
This add-on is donationware. It is developed by me in my own free time. I am not employed by Ventis Media, the company behind MediaMonkey, nor I've been paid by them for this add-on. So, if you found this add-on useful and want to help its further development, it would be nice if you send me some small donation using PayPal and you will get the new enhanced version that is available only to donors. Just leave me a note about your e-mail address, if it is different than the one that you have registered at PayPal, since I am sending the enhanced version of the add-on using e-mail attachment.
If you didn't get my e-mail for a day or two after your donation, you could check your Spam folder first and, if you cannot find it in there, please send me an e-mail with the information about donation to:
. Actually, if you are a GMail user, I recommend that you put my e-mail address to your Contact list before you make donation, so that GMail will not treat my e-mail sent to you as a spam. Thanks in advance!
This add-on doesn't work with MediaMonkey v5! Actually, none add-on made for some previous version of program could work with MM5, either by me or by another authors, since MM5 has completely different programming interface than before. If you really like my add-on and think that it is essential for your work with the program, you have several possibilities:
- you could stay with MM4;
- you could ask MM developers to implement support for old add-ons in MM5;
- you could wait for me to port the add-on to MM5, but don't hold your breath.
Fixed: update of the Date Modified property of file when changing the Timestamp feld;
v4.4.7 - 2017-01-07
Fixed: unneeded update of the timestamp when modifying non-tag fields (e.g. Added);
Fixed: Delete emptied folders option after moving files, all empty parent folders are now removed (until now only empty folder that contained moved media file(s) was removed, but not its empty parent folders).
v4.4.6 - 2016-04-22
Fixed: typing numerical values on keyboard in SpinEdit controls on the adjustment and Preset Settings dialog boxes (functional only in MM v22.214.171.1249 or higher);
Fixed: unnecessary display of dialog box on start-up asking if you want to install new presets after automatic adjustment of clock caused by switch in daylight saving time;
Fixed: Date and Original Date fields, now they display dates using ISO format and accept empty string for resetting the field;
Fixed: display of source/destination field in the adjustment dialog box for renamed Custom fields;
Fixed: Replace All button in the Preset Settings dialog box for presets that use bReplacing variable (e.g. the "Swap fields" preset).
v4.4.1 - 2015-08-26
Added: possibility to specify <Into Field> tag in the Replace with string which would be replaced with the field specified in the dropdown list next to the << button when the VBScript expression is turned on (this allows more generic presets that could be used with any selected field instead of hard-coded ones in the Replace with string);
Fixed: incorrect modification of tags and presets when using the Tag Manipulation Presets menu (broken in 4.4).
v4.4 - 2015-06-22
Added: pop-up menu items to the tracklist and Now Playing panel;
Fixed: many things.
v4.3 - 2011-07-06
Added: independent toolbar for RegExp buttons instead of Search toolbar [MM4];
Fixed: assigning numerical values to textual fields, e.g. Track# (broken in v4.2).
v4.2.1 - 2011-06-22
Fixed: error when replacing Type field [MM4].
v4.2 - 2011-06-21
Added: All Text Fields item to Into and From dropdown lists which allows assigning the same value to the several fields at once (with MM 3.1 or higher it could be specified which fields you want to modify using settings in the Search sheet of the Options dialog box; please be careful with that option, especialy with the specified Path field!);
Added: possibility to specify <From Field> tag in the Replace with string which would be replaced with the field specified in the dropdown list next to the << button when the VBScript expression is turned on (this allows more generic presets that could be used with any selected field instead of hard-coded ones in the Replace with string);
Added: Series, Director, Producer, Actor, Parental Rating, Episode #, Season # and Type (new) fields [MM4];
Changed: old Type field to Extension, Original Album Title to Original Title, Skip Counter to Skipped # (please update your own presets that contain these fields);
Added: 36 new presets, most of them using the new possibility with the <From Field> tag; the most important new preset is "Swap <From Field> and <Into Field>" which shows how it is possible to use single preset to modify two or more fields at once; some old presets fixed;
Fixed: case modification of Path/Folder.
v4.1 - 2011-03-03
Added: Start Time, Stop Time and Skip Counter fields (Start Time and Stop Time values in milliseconds) [MM4];
Added: MapChrCase and MapArrayCase custom functions, modified MapChr and MapArray functions (MapChrCase has same behavior as old MapChr and MapArrayCase has same behavior as old MapArray, MapArrayCase is similar to MapArray, but the replaced string would be capitalized if the first character of the original string is in upper case. Preset example: "Remove diacritical marks...");
Improved: import/export of presets with the same name, but different contents;
Fixed: install of sample presets when add-on is installed in local folder [MM4];
Fixed: skin styles path [MM4];
Fixed: error with some fields (Filename, Date, ...) when Regular expression 2 is turned on.
v4.0.4 - 2010-12-02
Added: 10 new presets, some old updated;
Fixed: RegExp-ID3_Genres.ini file with presets for ID3 genres, so the same genres could not be assigned twice to the same tracks;
Fixed: problem with SQLQuery function in some cases.
v4.0.3 - 2010-05-21
Added: 13 new presets;
Fixed: error when "Trim toolbar button's caption" value is changed.
v4.0.2 - 2010-05-10
Fixed: <Number> tag with MinValue and MaxValue arguments.
v4.0.1 - 2010-04-14
Changed: preset captions in the menu/toolbar when "Show dialog box for adjusting of the preset..." is checked on.
v4.0 - 2010-04-10
Added: possibility to specify custom arguments inside of the Find what and Replace with strings using <String> and <Number> tags, e.g. instead of 1 in some preset you could write <Number Caption="Increment" Value="1"> and when you choose that preset from menu or toolbar you would get dialog box which allows adjusting of that value; for description about this functionality please take a look at the Adjustment section;
Added: possibility to adjust source and destination fields inside of mentioned dialog box for preset, if you specify <Into Field> or <From Field> in the preset name;
Added: option "Show dialog box for adjusting of the preset selected in the menu or toolbar" (you could turn off display of the mentioned dialog box, even if you have presets with custom arguments);
Added: option "Modeless Find & Replace dialog box (allowed access to other parts of the program)" (now you could use F&R dialog without ever closing it);
Added: option "Display of tracks in Find & Replace dialog box synchronized with main window" (when you change node or selected tracks, this is automatically reflected in the F&R dialog; fully functional with MM 126.96.36.1998 or up);
Added: option "Show the toolbar button for the Find & Replace dialog box"
Added: option "Show the toolbar button for the Presets dropdown list"
Added: option "Show toolbar buttons for presets with enabled button in Find & Replace dialog box" (you could turn off all preset buttons, even if they have Toolbar button option checked on in the F&R dialog);
Added: Folder, Filename and Type fields (Path = Folder \ Filename . Type);
Added: Bookmark and Playback % fields (the playback position for audiobooks, the first field is in ms and the second one is in percents);
Added: DateISO, SetVar and GetVar custom functions;
Added: many new presets, some old improved;
Changed: Save button now have 3 possible states depending of modifications in the F&R dialog - Rename, Update and Add (it is now much easier to create new preset based on some existing one).
Fixed: error during start-up if none preset exists.
v3.5 - 2009-05-14
Improved: skin styles;
Fixed: load of empty and duplicated presets.
v3.4.3 - 2009-05-10
Fixed: modifications of the Date and the Original Date fields.
v3.4.2 - 2009-04-14
Fixed: saving of presets with localized versions of Windows.
v3.4.1 - 2009-02-25
Fixed: Replace/Replace All for some presets (a bug introduced with the last update).
v3.4 - 2009-02-21
Added: possibility to cancel Find Next/Replace All operations;
Added: insert of the field name on the cursor position in the Replace with edit box (MM 188.8.131.522 or up);
Added: some new presets;
Improved (bug): speed of the Replace All (drastically) when there are many unmatched tracks (bug).
v3.3 - 2009-02-02
Added: auto-repeat for Up/Down buttons in the Export/Import dialog box with MM 184.108.40.2060 or up;
Added: word-wrap option for display of presets in the Export/Import dialog box;
Added: alphabetical sort of presets in the Export/Import dialog box by click on the table header.
v3.2 - 2009-01-20
Improved: look of dialog boxes with some skins (custom configurable with CSS files);
Improved: speed of selecting tracks for main tracklist (drastically) and Now Playing panel with MM 220.127.116.114 and up;
Added: some new presets (some old improved).
v3.1 - 2009-01-10
Added: option to enable/disable display of the toolbar button for the last executed preset;
Added: option to keep display of the toolbar button for the last executed preset after restart;
Added: some new presets (some old improved);
Fixed: detection when the Now Playing panel has a focus, even with MM3 older that 18.104.22.1680;
Fixed: Select un/matched/Select to replace.
v3.0 - 2009-01-02
Added: export/import/batch delete of presets;
Added: option to display every checked preset as the toolbar button;
Added: option to asign an icon to the preset item in the menu/toolbar (could be from external .ico file);
Added: option for backward direction when finding matched tracks;
Added: possibility to find/replace data in tracks from the Now Playing panel [MM3];
Added: Day, Month, Date, Original Day, Original Month and Original Date fields (the old Date renamed to Year, the old Original Date renamed to Original Year; the new Date/Original Date accepts full date format YYYY-MM-DD) [MM3];
Added: option to delete emptied folders when moving files as a result of the Path modification;
Added/improved: the New button (old behavior when creating new presets is abandoned);
Added: many new presets (many old improved);
Improved: speed of Replace and Replace All when only few songs from a large list of songs should be updated;
Fixed/improved: Select un/matched/Select to replace with large number of selected/visible tracks;
Fixed: reading/writing presets from the .ini file with MM 22.214.171.1248 and newer (actually, the format of presets in .ini file is changed);
Fixed: truncated bottom buttons with some skins.
v2.2.2 - 2008-06-20
Fixed: error "file not found".
v2.2.1 - 2008-06-19
Added: synchronous display of current track in the table during navigation;
Added: possibility for jump to current track by click on the coresponding row number in the table;
Fixed: reset of the table after Replace command;
Fixed: checked state of rows in the table after toggle with the "?" button;
Fixed: merging new presets with old ones after installation for multi-user accounts.
v2.2 - 2008-06-14
Added: possibility to check which tracks from the table should be replaced;
Added: IfNull custom function for use with VBScript expressions;
Added: many new presets (some old improved);
Fixed: moving to the previous/next group of tracks (buttons |< and >|).
v2.1.2 - 2008-06-11
Fixed: display of the new line characters in the string when used with the VBScript expression.
v2.1.1 - 2008-06-10
Fixed: display and replacement of the new line characters in the string (Lyrics, Comment).
v2.1 - 2008-05-27
Added: options to select all un/matched tracks in the tracklist (Sel. matched and Sel. unmatch.) [MM3];
Added: options to keep only un/matched tracks, other tracks are removed from the tracklist (Keep matched and Keep unmatch.);
Added: option to select all tracks that could be modified, i.e. old content is different than replacement (Sel. replace) [MM3];
Added: option to keep only tracks that could be modified (Keep replace);
Added: option to toggle between selected/visible tracks;
Added: different highlight colors for matched tracks and for tracks that could be modified;
Added: SQLQuery custom function for use with VBScript expressions;
Added: many new presets (some old improved);
Improved: response during a table refresh with time consuming expressions;
Fixed: table with old/new content not updated after Replace All.
v2.0.1 - 2008-05-19
Fixed: INI file with presets;
Fixed: the ordinal number of tracks displayed in the table.
v2.0 - 2008-05-19
Added: support for presets (Save, Delete, Move Up/Down) with more than 30 already predefined;
Added: support for VBScript expressions for replacement;
Added: the table with old/new display for defined number of selected/visible tracks;
Added: highlighted display of matches;
Added: Find what/Replace with dropdown lists with recently entered strings;
Added: support for the progress bar and many other improvements.
v1.0.2 - 2008-05-07
Fixed: updating tags into files.
v1.0.1 - 2008-04-25
Fixed: error which is manifesting with double apostrophes inside of the field text.
For MediaMonkey 3.0 or higher - just double-click on the RegExpReplace-xx.mmip file; if you are on Vista or Win7 and you got "Product installation error", make sure you have MM3 set to "Run as Administrator"; if you downloaded the installation package with IE7 and it changed its extension to a .zip, you should first change it back to a .mmip.
For MediaMonkey 2.x - rename a .mmip extension to a .zip, extract RegExpReplace.vbs and RegExpReplace.ini files to the MediaMonkey's "Scripts\Auto" folder and restart MM program.
Note: The RegExpReplace.ini file in Auto folder is used only after installation. During its work, the RegExp Find & Replace add-on stores presets into the MediaMonkey.ini file.
If you are upgrading this add-on from some old version, especially if there is updated syntax of presets, it is strongly recommended to follow these steps:
1. make a backup of your own created presets using the Edit > RegExp Export/Import dialog box (pre-v4.4), or Edit > RegExp Find and Replace > Maintain Presets dialog box (v4.4 or higher);
2. uninstall the old version of the add-on and choose Yes when you are asked if you want to remove add-on settings;
3. install the new version of the add-on;
4. import your own created presets using the Edit > RegExp Find and Replace > Maintain Presets dialog box.
In that way you would always have the latest and updated presets. If you don't remove old settings (together with presets), during the installation this add-on would check the preset's names and if they are same as old ones it would skip their installation, even if they are updated.
The RegExp Find and Replace add-on could be used by the beginners as well as by very advanced users:
1. The beginners could use the add-on by just applying the presets from the menu. You could find 250+ predefined presets for different tasks that could be useful for you without any additional adjustment, e.g. you could clear field, copy conditionally full or part of one field to another, swap the first and the last name of Artist, ... However, with many presets there is a possibility for their fine adjustment in the dialog box that could contain one or more different controls depending of the tags used in the corresponding preset. For example, with the preset "Swap nn-th and mm-th words of <Into Field>" you could set 3 parameters: Destination field, First word and After words.
If you modify some parameter in the adjustment dialog box and confirm execution of the preset with the OK button, that modification will be remembered in the corresponding preset.
2. Somewhat more experienced users could create their own presets to do some frequent data manipulations that are different than those that are included with the add-on. You could use the Edit > RegExp Find and Replace > Preset Settings dialog box to find/replace data in files as you could do in any text editor, but you could also use the same dialog box to create/edit presets. Such presets could be applied from the mentioned dialog box, but they are also directly accessible using the corresponding menus, hotkeys and/or toolbar buttons.
The replacing presets started using menu/hotkey/toolbar will be applied to the files selected in the main filelist or Now playing panel, depending of that which panel is active.
You could open the add-on's dialog boxes and apply its presets using the RegExp Find and Replace menu items located in the main Edit menu and popup menus of the main filelist and Now playing panel. You could also get the same menu if you click on the RegExp Tagging Presets toolbar button (light bulb) located on the Search toolbar [MM2-3] or RegExp Find and Replace toolbar [MM4] if the Show the toolbar button for the Presets dropdown list option is turned on in the Options dialog box.
The following items are available in menus:
Preset Settings - use this command if you want to open the RegExp Find and Replace / Preset Settings dialog box that allows finding/replacing metadata in files/database and creating/editing presets; this command is always visible in the Edit menu and popup menus of the filelist/Now playing panel, it is also visible in the RegExp Tagging Presets toolbar menu (light bulb) if the Show the toolbar button for the Find & Replace dialog box option is turned off in the Options dialog box, i.e. when its toolbar button is hidden.
Manage Presets - this command opens the Manage RegExp Presets dialog box that contains a table with all available presets and it allows batch operations on several presets at the same time, e.g. Del, Export or Import. It also has some another commands that are better used when the presets are displayed in the tabular form, e.g. Up or Down for moving of some specific preset inside the list.
Options - when you choose this command you will get opened the RegExp Find and Replace Options dialog box that contains some less important options that affect behavior of the add-on and/or all presets in general.
The next item in menu displays the last applied preset and it is visible only if the Show the toolbar button for the last executed preset from the menu list option is turned on in the Options dialog box.
Tags Manipulation Presets - this sub-menu contains all presets that are stored in the MediaMonkey.ini file, if you choose some item from that menu you will start execution of the corresponding preset.
RegExp Find and Replace / Preset Settings
The Preset Settings dialog box allows finding/replacing metadata in files/database and creating/editing presets. This dialog box is resizable, so you could enlarge it, e.g. if you cannot see the content of some control.
The first group of controls in the Preset Settings dialog box is mainly about the user interface of the selected preset. Firstly, we have the Preset label showing the number of the selected preset and total number of presets and next to it we have a combo box which contains a list of all stored presets. You could select some specific preset from that list and after that you could apply it to the selected files or you could modify its settings to suits your needs. That control also allows you to enter a name for the new preset (just keep in mind that all presets should have unique names).
Next to the Preset combo box we have Move up/down buttons which allow us to move selected preset up or down in the list. Then we have 3 buttons for manipulation of presets: New, Rename/Update/Add and Del. The New button resets all controls in the dialog box to their initial (blank) states, which could be used when we want to create a new preset from the scratch. The following button should be used if we want to save the currently selected preset and it has 3 states/captions depending of modifications of the preset's settings:
1. Rename - if you change the preset name only and leave preset parameters unchanged;
2. Update - if you change some parameter (e.g. Description) and leave the preset name unchanged;
3. Add - if you change both the preset name and some parameter.
The last button in this row is Del which could be used when we want to remove the selected preset from the list permanently.
The first control in the next row is the Description text box which could be used to enter some information about the selected preset, e.g. to describe its effect with some examples. The description will be also displayed as a hint if you hover a mouse over the corresponding menu item or toolbar button of the preset.
If you want to apply some preset without searching for it in the Tags Manipulation Presets menu, you could assign the hotkey to the selected preset using the Shortcut text box, e.g. you could specify Shift+Ctrl+T, and you could apply such preset to the selected files by the press on that hotkey.
If you prefer mouse over keyboard, you could assign a toolbar button to the selected preset by ticking the Toolbar button check box, so you could just click on that button to start its execution. The toolbar buttons for the RegExp presets are displayed on the Search toolbar in MM2-3 or RegExp Find and Replace toolbar in MM4. By the way, you need to click on the Update button to confirm any modification of the preset's settings, even if you just toggle the state of the Toolbar check box.
The toolbar buttons of presets could display a textual caption with the name of preset or an icon. Since the preset names are very long, their captions could be trimmed to the specified number of characters using the Trim toolbar button's caption (maximal number of characters) option in the Options dialog box.
If you want to pack even more buttons on the toolbar, you could use the icons instead of the textual captions. You could assign the icon to the selected preset choosing it from the Icon dropdown list and that icon will be displayed in the presets menu and on the corresponding toolbar button. The icon could be loaded from an external .ico file or you could choose some internal MM's one represented with its number (the built-in icons for the Glided skin with their numbers could be downloaded from here). The external .ico file could be specified after click on the same Icon combo box when the mouse pointer looks like a pointing hand. If you want to remove icon from the preset, i.e. to get the textual caption back on the toolbar button, you should choose the first (empty) item from the Icon dropdown list.
The following controls in the Preset Settings dialog box describe how the selected preset should perform. The first control in the next (finding) group is the Find what combo box which is used to specify the string that we want to search for and/or to replace in the destination field. The Find what combo box has a dropdown list with the history of the last 5 applied search strings.
The next control is the Into combo box and with it we could specify the destination field that will be searched (and/or modified). The items in the Into/From dropdown lists represents the MediaMonkey fields that are available for searching/modification with this add-on and many of them have corresponding tags that are stored inside media files.
In general, the presets of the freely available version of the add-on could be applied only on one destination field at once. However, the first item in the Into list (All Text Fields) is specific and it allows modification of several textual fields at once using the same replacement. You could specify which text fields you want to modify using settings in the Search sheet of the Options dialog box [MM3.1+], but please be careful with that option, especially with the specified Path field!
If you want to manipulate several unrelated fields at once, you could try to do that with several presets applied in sequence. It is also possible to write a single preset that could modify two or more fields at once, but you need to have a good VBScript knowledge to do that (please take a look at the "Swap <From Field> and <Into Field>" preset as an example).
The Original info box is below Find what control and it displays the old content of the destination field specified with the Into combo box, i.e. the content before the applied replacement.
The Regular expression 1 check box should be ticked on if we want to use regular expressions in the Find what string. The next Full button is enabled only if the Regular expression 1 is ticked on; it could be used to insert the "^.*" string into the Find what combo box, which is the Regex replacement for the full content of the field, not matter what the selected field contains (actually, that works only with the single-line MM fields which are mostly in use, but not with the multi-line Comment and Lyrics fields).
The Find whole words only check box should be ticked on if we want to search only for whole words (otherwise any field text that contains the specified Find what string would be matched). It could be used only when the Regular expression 1 is ticked off since the regular expressions have their own way to find only whole words.
The first control in the next (replacing) group is the Replace with combo box which could be used for specifying a string that we want to use for the replacement. Similarly to the Find what combo box, that control has a dropdown list with the history of the last 5 applied replacement strings.
The next control is the From combo box which is enabled only if the Regular expression 2 or VBScript expression is ticked on. If the Regular expression 2 is ticked on, then you could use the From dropdown list to specify the source field for the replacement. However, if the VBScript expression is ticked on, then you could use the From list to select some field which you want to insert into the Replace with string using the newly displayed << button (it is visible only if VBScript is ticked on), or you could choose a field which would be substituted instead of the <From Field> tag that you could have specified inside of the Replace with string (please read the Adjustment section regarding to the <From Field> tag).
You should tick on the Regular expression 2 or VBScript expression check boxes if you want to use the corresponding expressions in the Replace with string. The Full button next to the Regular expression 2 check box has the same purpose as the Full button next to the Regular expression 1 check box, but this one could be used to insert "^.$" into the Replace with string if Regular expression 2 is ticked on.
Similarly to the Original info box in the finding group, the Replacement text box that is below the Replace with combo box serves only to display the old content of the source field specified in the From list if you have Regular expression 2 or VBScript expression ticked on.
The Result info box displays what would be the new content of the destination field specified with the Into combo box, i.e. the content after the applied replacement.
The last control which defines the preset's settings is the Match case check box which should be ticked on if you want to search and/or replace only parts of the string with the exactly same case, e.g. if you want to find "i" but not "I". It determines behavior of both Find what and Replace with strings.
The Backward search direction check box that is located in the same group as the previous controls is not technically speaking a part of the preset settings, but it is only temporary located there because of the lack of an empty space in the dialog box - if it is ticked on, the Find Next button will become Find Prev and with it you could search for the specified string backward in the range of selected files, starting with the current file whose number is displayed in the left-bottom corner of the dialog box.
The table below the replacing group of controls shows 25 files surrounding the current file, with displayed the old and new content of the chosen destination field in these files. The number of showed files in the table could be adjusted in the Options dialog box using the Maximal number of table rows in the Find & Replace dialog box option. Each row in the table has a check box in the first column, if that check box is ticked on the corresponding file will be modified when using the Replace or Replace All buton. With the check box on the left side of the table header you could tick on/off all files in the table.
If you click on the leftmost ? button from the bottom row of controls you would get the short reference for the Regular expressions and custom VBScript functions used in this add-on which will be displayed instead of the mentioned table with files - if you click on the same button again you would get back displayed that table again.
The number of the current file (on which you could apply the Replace option) is displayed in the text box in the left-bottom corner of the dialog box and the field's content of that file is displayed in the previously mentioned info boxes (Original, Replacement, Result). The up/down buttons next to that text box serve to change the current file in steps by one, while |< and >| buttons on the left side of that text box change it in 25 steps, i.e. one page up or down in the table.
The next button (which looks more like a text box) displays the total number of files that are selected/visible in the main filelists. If you click on that button you would toggle between selected and visible files. That means that you could apply the preset on all visible files without selecting them all in the filelist.
The Find Next button could be used to locate the next file that matches criteria specified with the controls in the finding group and that file would become the current one. If the Backward search direction check box is ticked on, that button will become Find Prev and with it you could search for the previous file which matches the specified criteria.
The Replace button could be used to apply the selected preset to the current file, after that the current file will become the next/previous file that matches the specified criteria. The Replace All button could be used to apply the selected preset to all files that are selected/visible in the main filelist (be very careful when doing that).
The last button at the bottom row before the Close button has several possible actions which could be chosen from the list that you could get by the click on the button with the down arrow: Keep Matched, Keep Unmatched, Keep to Replace, Select Matched, Select Unmatched and Select to Replace. None of those options modify fields/tags in files, but they could show which files have fields that could/couldn't be found/modified using the selected preset.
If you choose some of "Keep ..." options you would get removed all files from the main filelist that don't satisfy the selected option. For example, if you choose Keep to Replace option, you will get displayed only files that could be actually modified when using the selected preset. Similarly, if you choose some "Select ..." option you would get selected files in the main filelist that satisfy the selected option without removing other files.
Manage RegExp Presets
The Manage RegExp Presets dialog box contains a table with all available presets that allows batch operations on several presets at the same time. There are two radio buttons on the top of the dialog box: MediaMonkey.ini and File. If you select the MediaMonkey.ini option, you will get displayed all RegExp presets that are stored in the main MediaMonkey INI file, i.e. the presets that are displayed in the RegExp menus. You will be able to export such presets, as well as to delete or move them.
If you choose the File option, you could get displayed presets from some external INI file which could contain e.g. your previously exported presets. You could type its path in the following text box or you click on the "..." button and find that INI file in the new Open File dialog box. You will be able to import such presets, as well as to delete or move them (if the loaded INI file is not ticked to open as read-only).
The presets could be alphabetically sorted if you click on the table header that contains displayed the information about loaded presets. This operation is not reversible, so be careful using this option and make a backup of your presets first.
You could open the Edit RegExp Preset dialog box to edit some preset if you click its serial number displayed in the "#" column of the table for that preset in the Manage RegExp Presets dialog box; in that case all controls in the Edit RegExp Preset dialog box (that is very similar to the Preset Settings dialog box) will be set accordingly to the chosen preset, which means that you could modify the existing presets from the Manage RegExp Presets dialog box.
Selecting/checking of the preset(s) in the table of the Manage RegExp Presets dialog box on which you want to implement some operation could be done in two ways: you could use the check boxes located on the left side of the table or you could select the wanted preset directly in the table. Using the second way you could select only one preset at the time and that way has the precedence over those two ways of selecting, i.e. even if you have some or all presets checked in the table, if you choose some operation as Del it will be applied only on the selected preset, but not on the checked presets. If you want to deselect the currently selected preset, e.g. if you want to do some operation against the checked presets, then you should click on the already selected preset again.
The Up/Down operations could be done only on a single preset at the time that is selected in the table. Using the Up and Down buttons you could move the selected preset in the appropriate direction in the list of presets. Those two buttons have the auto-repeat possibility, i.e. it is enough to click on some of them and the selected preset will continue to move in the table until you release that button.
The Word wrap check box could be used to toggle the type of display of presets in the table.
You could use the Del button if you want to remove the selected/checked preset(s) permanently, so be careful using it. The enabled state of the next two buttons, Export and Import, depends of the selected option on the top of the dialog box: as it is already explained, you could export the selected/checked presets from the MediaMonkey.ini file or you could import the selected/checked presets from the specified external INI file.
The RegExp Find and Replace Options dialog box contains some less important options that affect behavior of the add-on and/or all presets in general. You could open this dialog box:
1) if you choose any of the mentioned Options commands in the RegExp Find and Replace sub-menus of the File menu, the RegExp Tagging Presets toolbar menu (light bulb) and the context menus of the main filelist and Now Playing panel, or
2) if you select RegExp Find and Replace add-on in the Tools > Extensions dialog box and click on the Options button, or
The same options could be found on the General > RegExp Find and Replace page in the Tools > Options dialog box.
Confirm update/delete of the preset selected in the Find & Replace dialog box: if you turn off this option you will not be asked if you want to update or delete preset in the Preset Settings dialog box.
Confirm execution of the preset selected in the menu or toolbar: if you turn off this option you will not be asked if you want to apply the preset that you have started by toolbar/hotkey/menu.
Show dialog box for adjusting of the preset selected in the menu or toolbar: if you turn off this option you will not get displayed the adjustment dialog box for the preset that you have started by toolbar/hotkey/menu.
Delete emptied folders when moving files as a result of the Path modification: you should turn on this option if you want to delete folders that are left empty after moving files as a result of the applied presets that modify the Path field.
Maximal number of table rows in the Find & Replace dialog box: you could set the maximum number of rows in the table of files in the Preset Settings dialog box using this option.
Trim toolbar button's caption (maximal number of characters): you could set the maximum number of characters that should be displayed on the toolbar buttons of presets.
Show the toolbar button for the Find & Replace dialog box: if you turn off this option the toolbar button that opens the Preset Settings dialog box will not be displayed.
Show the toolbar button for the Presets dropdown list: if you turn off this option the toolbar button that shows RegExp Find and Replace sub-menu in the toolbar will not be displayed.
Show the toolbar button for the last executed preset from the menu list: if you turn off this option the toolbar button that start execution of the last preset will not be displayed.
Keep the toolbar button for the last executed preset after restart: you should turn on this option if you want to get displayed the toolbar button that start execution of the last preset after restart of the program; this option is enabled when the previous option is turned on.
Show toolbar buttons for presets with enabled button in Find & Replace dialog box: if you turn off this option you will not get displayed the toolbar buttons for any preset, even if some of them have the Toolbar button options turned on.
Modeless Find & Replace dialog box (allowed access to other parts of the program): you could turn this option on if you want to get modeless Preset Settings dialog box which allows access to the other parts of the program; when that option is turned off, the mentioned dialog box will be modal and you need to close it if you want to use the other parts of the program.
Display of tracks in Find & Replace dialog box synchronized with main window: if you turn off this option the table of files in the Preset Settings dialog box will not change when you change the selection of files in the main filelist; this option is enabled when the previous option is turned on (you could change selection of files in the main filelist only if the Preset Settings dialog box is modeless).
This add-on has a possibility to display a resizable dialog box for adjustment of preset whenever you start its execution using menu/toolbar/hotkey if it is modified adequately. Usage of those dialog boxes is much simpler for use than the Preset Settings dialog box which has many controls that are confusing for beginners. For example, you could choose Edit > RegExp Find and Replace > Tag Manipulation Presets > Copy <From Field> to <Into Field>... and you would get the dialog box with just two dropdown lists for choosing the source and the destination fields. The number of displayed controls depends of the adjustment tags that are used in the preset.
If you specify <Into Field> tag in the name of some preset, you would get the adjustment dialog box with one dropdown list from which you could choose the destination field after you start the execution of preset. Similarly, if you specify <From Field> tag in the name of preset, you would get the dialog box with the dropdown list for choosing the source field. Of course, if you specify both <Into Field> and <From Field> in the name of the preset, you would get the dialog box with both dropdown lists. For example, the included preset "Copy <From Field> to <Into Field>..." displays both lists.
If you specify custom arguments inside of the Find what and Replace with strings using the <String Caption="xxx" Value="yyy"> tag, you would get the preset dialog box with the text box in which you could write some string and that string would be entered into same place in the Find what/Replace with string where you have put that <String> tag. Also, if you specify the <Number Caption="xxx" Value="yyy"> tag, you would get the preset dialog box with the spinedit control for choosing the numeric value. For example, if you write <Number Caption="Increment" Value="10"> instead of 10 in some preset, you would get the dialog box which allows adjusting of that numeric value.
The Value parameter is mandatory for those two tags. The Caption parameter allows you to specify descriptive text which would be displayed next to the control. It is not necessary to be specified, but it would be better for understanding of such preset if you use it. The <Number> tag additionally allows to specify two optional parameters: MinValue and MaxValue, the first one is for specifying the minimum value which could be entered with the spinedit control, and the second one is for the maximum value. If you omit those parameters, the default values are -1000 and 1000 correspondingly.
You could specify as many <String> and <Number> tags in the Find what and Replace with string as you want, and you would get the adequate number of controls within the preset dialog box. Of course, those controls would be displayed together with the source and the destination dropdown lists if you have <From Field> and/or <Into Field> in the name of the same preset. For example, the included preset "Replace specified string with another one in <Into Field>..." has the adjustment dialog box with the destination dropdown list and two text box controls - the first one is for specifying the string which would be replaced and the another one is for specifying the replacement string.
Adding any of those mentioned tags to the presets is optional. The presets with those tags are longer and somewhat harder to write, but you could do that just once and after that their adjustment using the adjustment dialog box will be child's play. Of course, many of the predefined presets are already written with such tags, so you could use them out of the box.
If you tick on the Don't show this dialog anymore check box in the adjustment dialog box, after you confirm the execution of preset, the subsequent presets started by menu/toolbar/hotkey will be applied without displaying of the adjustment dialog box. If you want to have the adjustment dialog box displayed again, you should turn on the Show dialog box for adjusting of the preset selected in the menu or toolbar option in the Options dialog box.
This add-on is a false positive reported as a worm by F-Secure. The author of F-Secure promised me that will update its database and put the add-on on the white-list, but still didn't. If you go to the www.virustotal.com/en/ site, you will see that it is safe tested by 54 popular anti-virus engines; the only one reporting a worm in it is F-Secure.