Difference between revisions of "ReNamer:Rules:Rearrange"
(Clarified the "skip extension" option) |
|||
(40 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Go|up=ReNamer:Rules|prev=ReNamer:Rules:Replace|next=ReNamer:Rules:Extension}} | ||
+ | == Rearrange rule == | ||
+ | [[Image:RearrangeRule.png|center]] | ||
− | This rule allows you to | + | This rule allows you to chop up the existing file name and reuse any/all of the parts in any order to compose a new name. |
− | You can also add your own text, or use | + | *You can also add your own text, or use meta tags while composing the new name. |
+ | *You can also use the whole original name, and insert literal text (or meta tags) around it.<br> | ||
− | + | The parameters are as follows: | |
− | + | {| class="wikitable" | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {| | ||
|- | |- | ||
− | + | ! Parameter | |
− | + | ! Description | |
|- | |- | ||
− | | | + | | Split using |
− | + | | | |
+ | Specifies how to split the existing name into parts. | ||
− | + | *You can use only one of the three options at a time (you cannot combine the chopping methods) | |
− | + | For detailed explanation of split methods please look below at the [[#Split options explained|split options explained]] section. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
|- | |- | ||
− | | | + | | [[Image:PlusButton.png]] |
− | + | | Add a separator for additional delimiters. The separator is a "{{Pipe}}" (vertical pipe) character, which can also be entered manually. | |
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | New pattern |
− | + | | | |
− | + | How to compose the new name from the parts created from the original name (see above). | |
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | *You can add meta tags and literal text wherever you want. | |
− | + | *$0 refers to the whole original name. This allows you to quickly compose a new name by inserting a string at the beginning and/or end. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | [[Image:ReNamer Insert Meta Tag Button.png]] |
− | | | + | | Click the button to see a list of [[ReNamer:Meta Tags|meta-tags]]. Select any meta tag to insert it in the new name template. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | Skip extension |
− | + | | If checked, the file extension will be excluded from the processing and will remain unaffected. | |
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | Right-to-left |
− | + | | | |
− | + | If selected, the numbering starts from right. | |
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
+ | *The characters of the original names are counted from right (the count begins with 1) | ||
+ | *The chopped parts will also be numbered from right ($1, $2, etc.) | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | === Split options explained === | |
− | |||
− | |||
+ | {| class="wikitable" | ||
|- | |- | ||
− | + | ! Option | |
− | + | ! Description | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | Delimiters |
− | | | + | | |
− | + | Chop the name where the delimiter occurs. | |
− | |||
− | |||
+ | *The delimiter can be a single character or a string. | ||
+ | *The chopped parts do <u>''not''</u> contain the delimiters (they are omitted totally) | ||
+ | *Spaces, numbers and symbols are treated like normal characters. | ||
+ | *Several delimiters can be used at a time. Use the {{pipe}} character to separate them. | ||
+ | *The chopped parts are numbered from left, as $1, $2, $3, etc. | ||
+ | :The same parts can be referred from the end as $-1, $-2, $-3, etc. | ||
+ | *If the delimiter occurs at the very beginning of the name, the resultant $1 contains nothing (because there is nothing on the left side of the delimiter). | ||
+ | :The same is true if an delimiter match at the very end of the name, the resultant $n contains nothing. | ||
− | + | <span style="color: red;">'''Warning:'''</span> The number of parts into which the filename is broken down depends solely on the number of delimiters in the filename. If you reference fewer parts in the output pattern that the number of available parts - not referenced parts will be lost! For example, take filename "Artist - Title" and to swap them around one would use " - " as a delimiter and "$2 - $1" as a new pattern which will result in "Title - Artist", but if some filename appears with more dashes like "Artist - Title - Album" the result will also be "Title - Artist" and last part will be lost. To make sure that no parts are lost use '''Exact pattern of delimiters''' option instead. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | Positions |
+ | | | ||
+ | Chop the name at the indicated position (the position count begins with 1). | ||
− | + | *If you enter position '''n''', ReNamer will chop the '''n'''-th character and all characters beyond that in a separate piece. | |
+ | *Spaces, numbers and symbols are treated like normal characters. | ||
+ | *No part of the original name is omitted during chopping. | ||
+ | *You can enter multiple positions. Separate them with the '''*|*''' sequence. | ||
+ | *The chopped parts are numbered from left, as $1, $2, $3, etc. | ||
− | + | :The same parts can be referred from the end as $-1, $-2, $-3, etc. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | Exact pattern of delimiters |
− | + | | | |
− | + | Chop the name using the exact pattern (sequence) of the delimiters. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | With this option you basically define how many parts you want the filename to be split into and the order in which the delimiters must occur. If you specify 1 delimiter then you end up with exactly 2 parts, if you specify 2 delimiters you'll get 3 parts, and so on. | ||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | == Examples == | ||
− | + | This rule is so versatile that it can be used in a huge number of ways. | |
+ | Therefore its examples have been moved to a separate article [[ReNamer:Rules:Rearrange Examples|Rearrange Examples]]. | ||
− | + | [[Category:ReNamer]] |
Latest revision as of 01:31, 1 April 2022
Rearrange rule
This rule allows you to chop up the existing file name and reuse any/all of the parts in any order to compose a new name.
- You can also add your own text, or use meta tags while composing the new name.
- You can also use the whole original name, and insert literal text (or meta tags) around it.
The parameters are as follows:
Parameter | Description |
---|---|
Split using |
Specifies how to split the existing name into parts.
For detailed explanation of split methods please look below at the split options explained section. |
Add a separator for additional delimiters. The separator is a "|" (vertical pipe) character, which can also be entered manually. | |
New pattern |
How to compose the new name from the parts created from the original name (see above).
|
Click the button to see a list of meta-tags. Select any meta tag to insert it in the new name template. | |
Skip extension | If checked, the file extension will be excluded from the processing and will remain unaffected. |
Right-to-left |
If selected, the numbering starts from right.
|
Split options explained
Option | Description |
---|---|
Delimiters |
Chop the name where the delimiter occurs.
Warning: The number of parts into which the filename is broken down depends solely on the number of delimiters in the filename. If you reference fewer parts in the output pattern that the number of available parts - not referenced parts will be lost! For example, take filename "Artist - Title" and to swap them around one would use " - " as a delimiter and "$2 - $1" as a new pattern which will result in "Title - Artist", but if some filename appears with more dashes like "Artist - Title - Album" the result will also be "Title - Artist" and last part will be lost. To make sure that no parts are lost use Exact pattern of delimiters option instead. |
Positions |
Chop the name at the indicated position (the position count begins with 1).
|
Exact pattern of delimiters |
Chop the name using the exact pattern (sequence) of the delimiters. With this option you basically define how many parts you want the filename to be split into and the order in which the delimiters must occur. If you specify 1 delimiter then you end up with exactly 2 parts, if you specify 2 delimiters you'll get 3 parts, and so on. |
Examples
This rule is so versatile that it can be used in a huge number of ways. Therefore its examples have been moved to a separate article Rearrange Examples.