RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM2+3]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

RegExp Find & Replace 4.0 w/ 207 presets (2010-05-21)[MM2+3]

Postby ZvezdanD on Sat Apr 19, 2008 9:52 pm

Description:
This add-on works with MM 2.x and 3.x. It allows powerful finding and replacing of strings inside of selected/visible tracks in the tracklist window of your audio database. The matching criteria and the replacement string can be created using Regular expressions or VBScript expressions which provides very flexible transformations of data. Almost all MM fields are supported!

Download:
http://solair.eunet.rs/~zvezdand/RegExpReplace.htm

Image

What is new:
v4.0.3 - 2010-05-21
* Added: 13 new presets;
* Fixed: error when "Trim toolbar button's caption" value is changed.

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, 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 Information 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 3.1.0.1218 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).

v3.6 - 2009-07-02
- Added: MapArrayEx and DateTimeISO custom functions.

v3.5.1 - 2009-06-18
- 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 3.1.0.1222 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 3.1.0.1220 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 the main tracklist (drastically) and the Now Playing panel with MM 3.1.0.1214 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 3.1.0.1210;
- Fixed: Select un/matched/Select to replace.

v3.0 - 2009-01-05
- 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 matched/Select to replace with large number of selected/visible tracks;
- Fixed: reading/writing presets from the .ini file with MM 3.1.0.1198 and newer (actually, the format of presets in the .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 corresponding 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 many 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.

v1.0 - 2008-04-19
- First public version.

Installation:
  • For MediaMonkey 3.x - just double-click on the RegExpReplace.mmip file; if you are on Vista 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 is used only after the installation. During its work, the RegExp Find & Replace add-on stores presets into the MediaMonkey.ini file.

Usage:
After the installation you will find a new option in the Edit menu of the MM program - RegExp Find and Replace. When you click on it, you'll get the same dialog box as it is in the screenshot from the top of this page. There are options similar to the almost any Find/Replace dialog in other programs, e.g. MS Word, but with extra additions of VBScript/Regular expressions. This means, if you don't turn on the option Regular expression, it will work almost as you expect. So, in the Find what text box you could enter string which you want to find inside of the MM field specified in the Into dropdown list, and after click on the Find Next button you should get the first track which contain matching criteria.

If you want to replace data in the founded track, you could enter some text in the Replace with text box (if you leave this box empty, the source data will be removed after using some Replace buttons, i.e. it will be replaced with the empty string). Contrary to the field in the Into dropdown list which always should be specified, the field inside of the From dropdown list is active only if you turn on the option Regular expression 2 or VBScript expression. This means, you could use string for replacements from existing MM fields only in combination with the VBScript/Regular expressions. But don't worry if you don't know Regular expressions - for the begin, all you should know is that you could specify .* if you want to use full string from some field.

This add-on doesn't support DOS/Windows file wildcards * and ?. Anyway, they are very limited in comparison to the possibility which you have using Regular expressions! For example, instead of * you could write .*, also instead of ? you could write .? and you would get almost same results.

Very important thing to know if you want to do some replacements is that a field specified with the Into dropdown list is a destination (to where replacement will take an effect), and a field specified with the From dropdown list is a source (from where you want to take a data). Maybe this is not so usual, because on many places you would find a source data area first and after that a destination, but this layout is here in use because such layout have almost all Find/Replace dialog boxes.

If you don't want to use some MM field for replacement, you could uncheck options Regular expression 2 and VBScript expression. In that case exactly same string entered in the Replace with text box will replace source data in all matched tracks if you click on the Replace All button. There is one exception for this - if you have checked the option Regular expression 1, you could specify $1, $2, ..., $xx tokens in the Replace with text box. In this case $1, $2... could not be used directly as replacement, so for example if you want to replace source string with $1 as the real text, you should specify double $ sign, i.e. $$1.

If you don't know too much about Regular expressions, here is some short explanation about this syntax. For example, if I want to swap the first and the last name of artists, I could specify "^(.+)\s(.+)$" in the Find what text box. Here we have two groups of expressions between parentheses - the first group is for the first name and the second is for the last name. So, if I want to swap this two groups, I need to specify "$2 $1" in the Replace with text box (if I enter "$1 $2", I will get same string as the source). As much as you have expressions surrounded by parentheses in the Find what text box, you could specify $nn tokens in the Replace with text box. If you don't want some expression to be used for replacements, but you need to put it inside of parentheses, you could specify "(?:expression)", where ?: is telling that this expression is not captured (numbered).

There are also some more "$" tokens which you could enter into Replace with text box, for example $&. This token substitute the text matched with the string from the field specified in the Into dropdown list. So, for example, if you enter "^.*" into Find what text box and "$&$&" into Replace with text box, you will get duplicated source string as a result of replacement (the option Regular expression 1 should be checked, and the Regular expression 2 should be unchecked). Of course, in previous examples you don't need to enter apostrophes ("") into text boxes - they are here as representation of the string.

Regular expressions are fairly complex for use and there are many sites on Internet which you could visit if you want to learn how to create them. For example, http://www.regular-expressions.info where you could find very nice tutorial about this.

Instead of using the Find Next button, you could manually browse your selected tracks with a help of |< and >| buttons and spinbox next to them. In the "Original" and "Result" textual areas, you would get displayed a result of possible string replacing for the current track. After you find a track which you want to change its data, you could click on the Replace button, and the add-on would transform string data for this track and try to find the next matching track, same as you get with the Find Next button. So, it is enough to click repeatably on the Replace button several times to replace string in all tracks which match specified criteria. If you are sure that all selected tracks contain string which should be replaced, you could use the Replace All button instead.

Maybe this is not obvious, so you should know that before you enter to the RegExp Find and Replace dialog box, you should first select tracks in the MM tracklist window for which you want to search or replace their data. If you don't select any track, this add-on will search/replace all tracks which are visible inside of the tracklist window. Please be very careful! If your tracklist has displayed all tracks from your database, after inappropriate usage of this add-on you could get undesired effect, i.e. corruption of your data. So, before any significant modification of data, please make a copy of the database first, especially in the begin until you get to be familiar with this add-on.

FAQ:
  • Q - How to create an "empty" preset that I can modify and save?

  • A - If you want to create a completely new preset: open the Edit / RegExp Find and Replace dialog box and click on the New button, type some text in the Preset field for its name and set other parameters; after that you should click on the Add button.

    - If you want to create a new preset based on some existing one: open the Edit / RegExp Find and Replace dialog box and choose initial preset from the Preset dropdown list, change its name and make necessary modifications on parameters; when you finish with them you should click on the Add button and preset will be saved as a new, not overwriting the initial one.

    By the way, there are two different ways to modify some existing preset:
    1. choose Edit / RegExp Find and Replace, then select the preset from the Preset dropdown list, edit it and click on the Rename/Update button.
    2. choose Edit / RegExp Export/Import, then click on the number of the needed preset from the # column, edit it and click on the OK button.

    The former Save button now has three different states, depending of modifications inside of the RegExp Find and Replace dialog box:
    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.

  • Q - Is there a way to remove the toolbar buttons for "Increment Playcount" and "Decrement Playcount" on the toolbar? I don't use them and they just take up space.

  • A - Mentioned two presets have toolbar buttons just as an example (similar as the "Move prefixes ..." which have added keyboard Shortcut as an example). You could turn on/off toolbar buttons for any of the preset by checking on/off the Toolbar button option in the Find & Replace dialog box. So, if you want to remove those two initially installed toolbar buttons from the toolbar:

    1. Open the RegExp Find and Replace dialog box;
    2. from the Preset dropdown list choose the preset "Increment Play counter by 1";
    3. turn off the Toolbar button check box;
    4. click on the Update button;
    5. from the Preset dropdown list choose the preset "Decrement Play counter by 1";
    6. same as 3;
    7. same as 4.

    The another possibility to remove the preset toolbar buttons is to turn off the option "Show toolbar buttons for presets with enabled button in Find & Replace dialog box" in the Options dialog box.
Limitations:
This add-on could work only with one destination field (specified with the Into dropdown list). If you want a manipulation with several fields, you could try to do this with several steps (presets) or you should use some another add-on, e.g. ExtractFields.

There are some regular expressions which don't work correctly with Unicode characters, for example RegExp with \w, \W, \b, \B. This is because RegExp engine built in VBScript doesn't treat Unicode characters as letters. One solution is to use character range, so instead of \w you could write e.g. [\w\u0400-\u04FF] for Cyrillic or [\w\u0100-\u024F] for extended Latin.

Information about 4.0 version:
The main addition of this version which needs some more explanation is the possibility to get dialog boxes whenever you click on some preset in the menu or toolbar if it is modified adequately. Usage of those dialog boxes is much simpler for use than the RegExp Find & Replace dialog box which has many controls that are confusing for beginners. Now you could choose, for example, Edit/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 that how the preset is modified, which will be explained further.

If you specify <Into Field> in the name of some preset, you would get the dialog box with one dropdown list from which you could choose the destination field after you click on that preset in menu. Similarly, if you specify <From Field> 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 minimal value which could be entered with spinedit control, and the second one is for the maximal 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 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.

Many of included presets are modified to support that new functionality, and if you are already using some old version of this add-on, it is strongly recommended to remove all your presets from the .ini file before installing the new version. However, before that you should make a backup of your own created presets and after the installation, you could import them back.

Note: MediaMonkey has a bug with spinedit control, because of which you should not use keyboard to enter number value, but you could use up/down buttons of that control to modify that value. This bug will be fixed with MM v4.0.

Information about 3.0 version:
Beside of a possibility to export/import presets, main improvement is a new option to add/remove any preset to the toolbar as a new button. So, you could define as much toolbar buttons as they could fit on the window. Toolbar buttons with presets could display a textual caption or an icon. The caption with a name of the preset could be trimmed to the specified number of characters (Options dialog) and icon could be loaded from an external .ico file or some internal MM one (icons takes much less space than captions). You could assign an icon to some preset in the RegExp Find and Replace dialog choosing it from the Icon dropdown list. The external .ico file could be specified after click on the same dropdown control when the mouse has the pointer with the hand.

There is a separate RegExp-ID3_Genres-Sorted.ini file with 148 new presets which allow to assign specific genre to multi-item Genre field. Import of mentioned .ini file with genres is through RegExp Export/Import dialog box, but if you want to use it, before its import it could be better to first remove initially installed presets (you could always get them back with the import of the RegExpReplace.ini file). After that you should choose which presets/genres you want to show in the toolbar, because there are many of them. Adding/removing some preset to/from the toolbar should be done in the RegExp Find and Replace dialog box - you should select a needed preset from the Preset dropdown list, then turn on/off the Toolbar button check box and click on the Save button to remember that modification.

Now, with just a single click on the toolbar button you could assign a genre to all selected/visible tracks. There is also one more preset which removes last added genre from each track. With the new version you have a possibility to modify tracks not only in the main tracklist, but also in the Now Playing panel. Of course, instead of the genre you could assign some text to every other field after creating/modifying some preset.

This version has the changed format of presets stored in the .ini file. During installation you will be prompted if you want to convert your old presets to the new format. This is just a prevention from some specific situations, but in most cases you should choose Yes. After that you will be prompted if you want to add new sample presets. There are many new presets and many of the old presets are updated/improved. Because the add-on during installation checks only if the old preset names matches with new ones, maybe it would be better if you first uninstall old version of the add-on and when you get a dialog box with a question if you want to remove all settings, you should choose Yes. In such way you should have only new, improved presets after installation.

However, if you already have your own created presets, you should forget about this suggestion - just start installation and when you get a question if you want to add new sample presets you should choose No. After that you should open Edit / RegExp Export/Import dialog box, manually remove all old supplied presets (leave only your own presets) and after click on the File option you should specify RegExpReplace.ini file for the import. Sorry for inconvenience, but there is not any easier way if you want to get new improved presets (those which existed before) and to keep your own ones.

Information about 2.x version:
Old Examples section is removed from this post because the new version of the add-on has all this examples incorporated into RegExp dialog box in the form of presets. You could define, save or delete existing presets. You could start execution of some preset directly from the menu or from the toolbar, but also with a press on user-defined shortcut key.

Presets:
There are currently 194 already predefined presets (with addition of 148 presets for ID3 genres):
  • Replace specified string with another one in <Into Field>...
  • Replace underlines with spaces in <Into Field>...
  • Replace acute and grave accents with apostrophes in <Into Field>...
  • Remove specified string from <Into Field>...
  • Remove http:// address from <Into Field>...
  • Remove iTunes info from Comment field
  • Clear <Into Field>...
  • Copy <From Field> to <Into Field>...
  • Copy <From Field> to <Into Field> only if it is empty...
  • Assign specified string to <Into Field>...
  • Assign specified string to Comment field...
  • Assign "Various Artists" to Album Artist field
  • Reset Track Volume field
  • Adjust maximal value of Track Volume to 1.0
  • Reset Last played field
  • Assign current date/time to Last played field
  • Increment Play counter by 1
  • Decrement Play counter by 1
  • Assign specified value to Play counter...
  • Assign specified value to Playback position (%)...
  • Increase Rating by half star
  • Decrease Rating by half star
  • Round half star Rating to full star
  • Remove month and day from release Date
  • Copy release Date to Original Date only if it is undefined
  • Add "The" prefix to the begin of <Into Field>...
  • Remove prefixes (The, A, An) from <Into Field>...
  • Move prefixes to the begin in <Into Field>...
  • Move prefixes to the end of <Into Field>...
  • Copy Artist name to <Into Field> with moved prefixes to the end...
  • Swap first and last name of <Into Field> with added ", "...
  • Swap last and first name of <Into Field> with removed ", "...
  • Copy Artist name to <Into Field> with swapped first and last name and added ", "...
  • Copy Artist name to <Into Field> with swapped last and first name and removed ", "...
  • Swap first two words of <Into Field>...
  • Swap nn-th and mm-th words of <Into Field>...
  • Add " (Live)" to the end of Title
  • Remove " (Live)" or " [Live]" from the end of Title
  • Add specified string to the begin of <Into Field> (only if not empty)...
  • Add specified string to the begin of <Into Field> separated with space if not empty...
  • Add specified string to the end of <Into Field> (only if not empty)...
  • Add specified string to the end of <Into Field> separated with space if not empty...
  • Remove specified string from the begin of <Into Field>...
  • Remove specified string from the end of <Into Field>...
  • Remove specified number of words from the begin of <Into Field>...
  • Remove specified number of words from the end of <Into Field>...
  • Remove timing marks from LRC Lyrics
  • Add Artist name to special section at the begin of Lyrics
  • Clear Lyrics greater than 1 line but less than 10 lines
  • Replace blank Lyrics with "[Instrumental]"
  • Replace double blank lines with single ones in Lyrics
  • Remove multiple blank lines from Lyrics
  • Remove leading and trailing blank lines from Lyrics
  • Remove leading and trailing spaces from each line of Lyrics
  • Remove multiple spaces from <Into Field>...
  • Remove leading and trailing spaces from <Into Field>...
  • Add spaces between words without spaces in <Into Field>...
  • Remove specified number of characters from the begin of <Into Field>...
  • Remove all except specified number of characters from the begin of <Into Field>...
  • Remove specified number of characters from the end of <Into Field>...
  • Remove all except specified number of characters from the end of <Into Field>...
  • Remove specified number of characters in the middle of <Into Field>...
  • Assign specified number of characters from the middle of Album to <Into Field>...
  • Remove Track number from the begin of <Into Field>...
  • Remove all digits from the begin of <Into Field>...
  • Remove all digits followed with " - " or ". " from the begin of <Into Field>...
  • Add Track number to the begin of Title
  • Add Track number with leading zero to the begin of Title
  • Remove leading zeroes from Track number
  • Add leading zero to single-digit Track number
  • Add leading zeroes to get 3-digit Track number
  • Increase Track number by specified value...
  • Auto-increment Track number with specified starting value...
  • Add ordinal number of current track to the begin of Title
  • Add ordinal number of current track with leading zero to the begin of Title
  • Add ordinal number of current track to the begin of Title increased by specified value...
  • Add "/" and total number of tracks to the end of Track number
  • Assign total number of tracks from the end of Track number to <Into Field>...
  • Remove "/" and total number of tracks from the end of Track number
  • Assign Disc number from 3-digits Track number
  • Remove disc number from 3-digits Track number
  • Assign Disc number from [(Disc/CD nn)] from the end of Album name
  • Remove disc number from the end of Album name
  • Assign disc number from the end of Album name to 3-digit Track number
  • Add Disc number to Album name only if contains 2 or more discs
  • Replace (Disc x) with (CD 0x) in Album name
  • Add Artist name and " - " to the begin of <Into Field> (only if exists)...
  • Add (Artist name) to the end of <Into Field> (only if exists)...
  • Assign the begin of <From Field> before " - " to <Into Field>...
  • Assign the begin of Title before " - " to <Into Field> (only if exists)...
  • Assign (the end) of Title to <Into Field> (only if exists)...
  • Remove Artist name and " - " or "-" from the begin of <Into Field>...
  • Remove (Artist name) from the end of <Into Field>...
  • Remove the begin of <Into Field> before (and including) " - "...
  • Remove the begin of <Into Field> before (and including) "-" or " - "...
  • Remove the begin of <Into Field> before (and including) specified string...
  • Remove the end of <Into Field> after (and including) specified string...
  • Add (Year) to the begin of Album (only if exists)...
  • Add (Year) to the end of Album (only if exists)...
  • Remove (year) or [year] from the begin of Album
  • Remove (year) or [year] from the end of Album
  • Remove (...) or [...] from the begin of <Into Field>...
  • Remove (...) or [...] from the end of <Into Field>...
  • Remove parenthesis that doesn't have pair from <Into Field>...
  • Remove bracket that doesn't have pair from <Into Field>...
  • Replace all [...] with (...) in <Into Field>...
  • Replace all (...) with [...] in <Into Field>...
  • Replace [...] with (...) only at the end of <Into Field>...
  • Replace (...) with [...] only at the end of <Into Field>...
  • Replace [ or { with ( and ] or } with ) in <Into Field>...
  • Replace (... remix/version/edit ...) with [ ... ] at the end of <Into Field>...
  • Replace [... remix/version/edit ...] with ( ... ) at the end of <Into Field>...
  • Assign (... remix/version/edit ...) from the end of Title to <Into Field>...
  • Assign ( remix/version/edit ) from the end of Title to <Into Field> (version only)...
  • Remove (... remix/version/edit ...) from the end of <Into Field>...
  • Add specified string as first item to multi-item <Into Field>...
  • Add specified string as last item to multi-item <Into Field>...
  • Move specified item to the begin of multi-item <Into Field>...
  • Remove first item from multi-item <Into Field>...
  • Remove all items from multi-item <Into Field> except first one...
  • Remove last item from multi-item <Into Field>...
  • Remove item with Artist name from multi-item Genre
  • Add Album name to the end of <Into Field> as last item using ";" as separator...
  • Add space character after ";" separator in multi-item <Into field> if missing
  • Remove space character after ";" separator in multi-item <Into field>
  • Replace ";" in multi-item <Into Field> with ", " but last one with " & "...
  • Replace last ", " with " & " in <Into Field>...
  • Replace first ", " or " & " with " feat. " in <Into Field>...
  • Replace "&", feat./pres./vs. with "; " in <Into Field>...
  • Replace "&", feat./pres./vs. with "; " in <Into Field> and remove ( ) if exist...
  • Copy featuring artists or [(featuring artist)] from the end of Title to the end of Artist
  • Copy featuring artists from the end of Title to the end of Artist and put them within ( )
  • Copy featuring artists from the end of Title to the end of Artist and put them within [ ]
  • Copy featuring artists or [(featuring artists)] from the end of Artist to the end of Title
  • Copy featuring artists from the end of Artist to the end of Title and put them within [ ]
  • Copy featuring artists from the end of Artist to the end of Title and put them within ( )
  • Remove featuring artists or [(featuring artists]) from the end of <Into Field>...
  • Put featuring artists from the end of <Into Field> into ( ) parenthesis...
  • Put featuring artists from the end of <Into Field> into [ ] brackets...
  • Put featuring artists and remix (if exists) in separate brackets in Title
  • Add featuring artists from Artist to the end of Involved people as item with category
  • Add main artists from Artist to the end of Involved people as item with category
  • Remove all featuring artists from items of Involved people
  • Remove all main artists from items of Involved people
  • Assign names of contained playlists to <Into Field>...
  • Assign BPM from (nnn BPM) part of Title (not necessarily on its end)
  • Remove (nnn BPM) from Title (not necessarily on its end)
  • Assign Original Artist from (... cover) part of Title
  • Add Mood and Tempo to the end of <Into Field>...
  • Add track Length surrounded by ( ) to the end of Title
  • Append album length surrounded by ( ) to Album name
  • Assign date/time when file is created to Timestamp field
  • Assign date/time when file is created in ISO 8601 format to <Into Field>...
  • Assign Last played date/time in ISO 8601 format to <Into Field>...
  • Convert date to ISO8601 format in <Into Field>...
  • Assign Year if it is undefined with value assigned to most tracks from same album
  • Assign Year if it is different from value assigned to most tracks from same album
  • Assign Genre if it is empty with value assigned to most tracks from same album
  • Assign Genre if it is different from value assigned to most tracks from same album
  • Assign weighted average Rating of album to <Into Field>...
  • Assign weighted average Track volume of album's tracks to Album volume
  • Assign specified folder level of Path to <Into Field>...
  • Extract Album Artist from last folder of Path (e.g. ..\Album artist - Album\Title.mp3)
  • Uppercase first letter of each folder/filename of Path
  • Lowercase extension of Path
  • Replace periods "." in filename of Path with spaces " "
  • Remove periods from the end of File name
  • Assign Title to filename of Path
  • Assign Track number - Title to filename of Path
  • Assign Track Number, Artist and Title to "IRC" styled File name
  • Add Artist name to the begin of File name if it is not already there
  • Append weighted average Bitrate of album to the last folder of Path
  • Append VBR and weighted average Bitrate of album to the last folder of Path
  • Append track Length surrounded by ( ) to filename of Path
  • Add "Disc #" as last folder only if some song from album has Disc number >= 2
  • Remove the begin of filename before " - " in Path
  • Remove the begin of filename before " - " and add it as last folder of Path
  • Remove Artist name from the begin of filename of Path
  • Remove Artist name from the begin of filename and add it as last folder of Path
  • Remove Track number from the begin of filename of Path
  • Remove Artist name or Track number from the begin of filename of Path
  • Update filename of Path to ..\<Title> - <Artist> - <Album>.ext
  • Move files to <Genre>\<Artist>\<Album>\<Track#> - <Title>.ext
  • Move files to Temp folder
  • Fix common words (featuring, presents, versus) in <Into Field>...
  • Fix common words (I'm, I'll, don't, won't, ain't, isn't, can't) in <Into Field>...
  • Fix specified Artist names (10cc, AC/DC, INXS, UB40)
  • Fix <Into Field> with styles entered from All Music Guide
  • Fix Napster file tagging, e.g. The Way It Is (Mix) [Mix]/Mix -> The Way It Is (Mix)
  • Capitalize <Into Field> (ASCII, Latin-1, Latin-2 & Cyrillic)...
  • Capitalize <Into Field> with exceptions (ASCII, Latin-1, Latin-2 & Cyrillic)...
  • Lowercase Single, Edit, Remix or Mix in the <Into field>...
  • Uppercase first letter of each line or sentence of Lyrics and lowercase others
  • Uppercase first letter of each line or sentence of Lyrics with exceptions
  • Uppercase English "I" and first letter of each line or sentence of Lyrics
  • Uppercase only first letter of each line or sentence of Lyrics, others unchanged
  • Remove diacritical marks from <Into Field> (aeiou)...
  • Remove diacritical marks from <Into Field> (cdghjklnrstywz)...
  • Remove diacritical marks from <Into Field> (aeioucdghjklnrstywz)...
  • Convert Cyrillic (Windows-1251) to Unicode in <Into Field>...
  • Convert Cyrillic Unicode to Windows-1251 in <Into Field>...
  • Convert Serbian Latin to Serbian Cyrillic in <Into Field>...
  • Convert Serbian Cyrillic to Serbian Latin in <Into Field>...
  • Convert Latin to Russian Cyrillic in <Into Field>...
  • Convert Russian Cyrillic to Latin in <Into Field>...
  • Convert Latin to Greek in <Into Field>...
  • Convert Greek to Latin in <Into Field>...

Beside of searching for some specific string, this add-on could be used to change data, so please be very careful. Make a backup of the database before any serious modification.

If you have some interesting VBScript/Regular expression for tags manipulation, please post it in this thread.
Last edited by ZvezdanD on Fri May 21, 2010 12:16 pm, edited 36 times in total.
ZvezdanD
 
Posts: 1875
Joined: Fri Jun 09, 2006 12:40 am

Postby Bex on Sat Apr 19, 2008 9:56 pm

Cool! I'll check it out later! :)
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
 
Posts: 5924
Joined: Fri May 21, 2004 10:44 am
Location: Sweden

Postby Teknojnky on Sat Apr 19, 2008 11:44 pm

Wow you just saved me alot of work, I was eventually gonna work on such a script if I ever finished up last.fm node. ;)

Thanks ZvezdanD!
Teknojnky
 
Posts: 5342
Joined: Wed Sep 07, 2005 4:01 am

Postby Teknojnky on Sun Apr 20, 2008 12:04 am

ahhh hehe I was looking at how to start the script but I eventually found it under the EDIT menu :)
Teknojnky
 
Posts: 5342
Joined: Wed Sep 07, 2005 4:01 am

Postby Bex on Sun Apr 20, 2008 12:09 am

Same here! :lol:
I had to look at the script code to find it.

ZvezdanD,
We want it as right click menu option! :D
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
 
Posts: 5924
Joined: Fri May 21, 2004 10:44 am
Location: Sweden

Postby onenonymous on Sun Apr 20, 2008 12:57 am

Nice script!

Bex wrote:Same here! :lol:
I had to look at the script code to find it.

ZvezdanD,
We want it as right click menu option! :D

There's also a button on the Search toolbar.
onenonymous
 
Posts: 373
Joined: Sat Feb 02, 2008 6:09 pm
Location: Texas

Postby trixmoto on Sun Apr 20, 2008 8:02 am

Wow, looks like a pretty powerful script. I'm sure this will be very popular! :)
Loving the Monkey? - Get Gold
Check out my scripts at http://trixmoto.net including my top ten
Getting "Product Installation Error" when installing scripts? - Try this
Subscribe to my RSS feed for all the latest news
trixmoto
 
Posts: 8509
Joined: Fri Aug 26, 2005 8:28 am
Location: England

Postby ZvezdanD on Sun Apr 20, 2008 3:13 pm

Thanks folks for all kind words :)

The first post is updated with instructions about an installation and usage.
ZvezdanD
 
Posts: 1875
Joined: Fri Jun 09, 2006 12:40 am

Postby raybeau528 on Wed Apr 23, 2008 10:27 pm

Super useful!!! Just saved me from writing a single purpose script.

Ray
raybeau528
 
Posts: 401
Joined: Thu Sep 27, 2007 9:19 pm
Location: Connecticut

Postby Teknojnky on Thu Apr 24, 2008 6:56 pm

I was trying to a search and replace on ~750 tracks:

find \
replace

meaning I wanted to remove the "\" charcter.

When I selected replace all, I got the following error:

error #1025
expected end of statement
line 922, column 8


here is at least one example title which causes the above error

"Area 51" off of our 7\'\' rel

removing the \ should result in
"Area 51" off of our 7'' rel

note, the 7'' would be two apostrephies in this particular example

this error also happens when there are no matching 'find' strings

I am not using regex for either situation.
Last edited by Teknojnky on Thu Apr 24, 2008 7:44 pm, edited 2 times in total.
Teknojnky
 
Posts: 5342
Joined: Wed Sep 07, 2005 4:01 am

Postby Teknojnky on Thu Apr 24, 2008 7:00 pm

And a feature request: input history so the user does not have to remember previous find/replace strings. (but I assume this is not trivial to implement)

I would also suggest that the cancel button be re-worded to 'Close', since cancel implies that changes will be lost or reverted when pressed and since this does not seem to be the case, replacments already made will not be undone.

Also part II, a 'rewind to start of selected' button would be greatly useful when making multiple find/replaces on the same selection of files... it can get a bit annoying trying to click the previous button a few dozen or hundred times. :o
Teknojnky
 
Posts: 5342
Joined: Wed Sep 07, 2005 4:01 am

Postby ZvezdanD on Thu Apr 24, 2008 10:25 pm

Teknojnky wrote:When I selected replace all, I got the following error:
"Area 51" off of our 7\'\' rel

There was a problem with double apostrophes (") inside of the string. It is now resolved, please take a look on v1.0.1. Thank you very much for the report.
ZvezdanD
 
Posts: 1875
Joined: Fri Jun 09, 2006 12:40 am

Postby ZvezdanD on Thu Apr 24, 2008 10:41 pm

Teknojnky wrote:And a feature request: input history so the user does not have to remember previous find/replace strings.

I would also suggest that the cancel button be re-worded to 'Close',

a 'rewind to start of selected' button would be greatly useful

I already though about renaming Cancel to Close, but I saw that almost all MM dialog boxes has Cancel. Anyway, I changed that to Close in v1.0.1.

Other suggestions are already planed in similar form for the next version.
ZvezdanD
 
Posts: 1875
Joined: Fri Jun 09, 2006 12:40 am

Postby Teknojnky on Thu Apr 24, 2008 10:43 pm

Awesome! :)
Teknojnky
 
Posts: 5342
Joined: Wed Sep 07, 2005 4:01 am

Postby Davo on Fri Apr 25, 2008 2:39 am

Great script - I just noticed when i selected a Title field that in the "before" & "after" area it displays ampersands as underscores. eg Koerner, Ray & Glover becomes Koerner, Ray _Glover

David
Davo
 
Posts: 109
Joined: Wed Nov 07, 2007 2:00 am
Location: Australia

Next

Return to Need Help with Addons?

Who is online

Users browsing this forum: Ask Jeeves [Bot], MSN [Bot] and 6 guests