Difference between revisions of "ReNamer:Rules:Replace"
Line 26: | Line 26: | ||
| Replace | | Replace | ||
| Enter strings that will replace the "Find" strings. | | Enter strings that will replace the "Find" strings. | ||
− | *Note that the | + | *Note that the number of strings (separated with '''*|*''') in "Find" and "Replace" boxes should be the same. If there is more strings in the "Find" box than in the "Replace" box the spare strings will be removed (replaced with an empty string). If there is more strings in the "Replace" box, the spare strings will be ignored. |
|- | |- |
Revision as of 07:12, 25 July 2010
Replace Rule
This rule removes the specified string from the name and replaces it with another string. It has options to replace the first occurrence, the last occurrence, or all the occurrences. You can replace multiple strings at a time. You can create a pattern with wildcards, so that any string that matches the pattern will be removed.
The parameters are as follows:
Parameter | Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Find | Enter the string to be replaced.
| |||||||||||||||
button | *) from the keyboard.
This inserts a separator in Replace box also. This means that pairs are replaced (e.g. A -->A', B -->B' etc.) } | |||||||||||||||
Replace | Enter strings that will replace the "Find" strings.
| |||||||||||||||
Insert meta tag | Click the button to see a list of meta-tags. | |||||||||||||||
Occurrences | In case that strings occure more than once in the filename, specify which occurrences should be replaced. (Options are: first only, last only, or all) | |||||||||||||||
Skip extension | If this check box is selected, the extension will be ignored by the rule. | |||||||||||||||
Case sensitive | Will only remove a specified string from the name if the case matches exactly. | |||||||||||||||
Interpret symbols as wild cards | The following wild cards are allowed (compare with RegEx).
|
Note: If you enter multiple find and replace strings they will be executed as multiple Replace rules, so first string will go first and only after replacing all (or first, or last) occurences of that string the second string in the Find box will be searched & replaced.
Example:
Find: A|B
Replace: B|A
Name: ABBA.mp3
New name: AAAA.mp3
You may expect the new name to be BAAB.mp3, but it's not. This happens because first all A's are replaced with B's (so we've got BBBB.mp3) and only then all B's are replaced with A's (and the final result is AAAA.mp3).
If you need to replace some characters one with another use [ReNamer:Rules:Translit|Translit] rule.