-
Notifications
You must be signed in to change notification settings - Fork 0
Rename Notebook Tab
In this section we will discuss how the options of the "Rename Notebook Tab" work. The options have been grouped in different named sections that explains a bit what the group does by their common use.
There are many groups of options inside the "Rename Notebook Tab", with also many options inside of each; but the important part is that you ONLY need to change the options that you want to use. In other words, an option that you leave with the default values won't affect the final name. And also, as we said previously, those changes will only apply to the selected items.
Also the changes will be made to the name in a specific order, always the same: each group has a name, and next to that name is a number; that number is the order in which the changes are made, starting from 0 and up, and only once you hit the "Rename" button.
Every group has a "R" button inside of it. This button resets the whole group to the default empty values.
All the changes to the filename done by the options DO NOT affect the extension. Only the "Extension" group affects the extension.
This group will change the names of the files to follow a list given from a file. The program will read the file and asing each item a line in order.
This group has the following options:
- Filename: the full path to the text file we want to use to change the names.
- Wrap: checking this option will change from the default behaviour (once every line has been assigned to a file the rest of the selected files don't see any changes done to them from this option but sill be affected from the rest of the options) to wrapping over and once it finishes the list starts from the start again. So for example with a text file that has "a" in the first line and "b" in the second without the wrap option checked the names will be: a, b, whatever-the-file-was-named, whatever-the-file-was-named... But with the wrap option checked: a, b, a, b...
In this group you can use regular expressions to change the names of the items. The expressions can be as complex as you want. The use of regular expression is a whole book on itself and it's not covered in this guide, but we will show an example later.
This group has the following options:
- Match: In this text field you write the regular expression you want to match.
- Replace: And in this text field the expression you want to substitute it with.
- Extend: Because the regular expression can get very long very fast this button will open a new window with two extra large text fields. Anything that you had already written will appear in those fields and when you are done just hit the "Done" button and what you have written will transfer to the fields in the original window.
Let's say that we have the following
Item name: Program Files
Match: ^([A-Z][a-z]*) ([A-Z][a-z]*) Replace: The /2 which are used to run the /1 Returns: The Files which are used to run the Program
What happens is the regular expression creates 2 groups made out of alphabetic characters separated by a space. Then in the replace we set a new name and have a forward slash (/) to denote the groups by number and that gets replaced returning the final name that we see.
This group has the following options:
-
Name: This is a dropdown menu with several options.
- Keep: doesn't change the name.
- Remove: removes the name entirely (leaves an empty name).
- Reverse: reverses the order of the characters (e.g: "abc" would end "cba").
- Fixed: changes the name for a fixed name written in the next option.
- Fixed text entry: even though this option doesn't have a name it is for the specification of what name to use when the "Fixed" option we just mentioned is selected (e.g: with "abc" written in this field every selected item new name would be "abc")
This options searchs for some text (from a single character to whole words, anything) inside the items name and then replaces each occurrence with whatever is in the "With" option.
This group has the following options:
- Replace: in this text entry write whatever you want to replace, be it a letter, a number, a symbol, a word...
- With: and it will be replaced by what you write here.
- Match Case: by default the replacing is case insensitive to what you write in the "Replace" option. checking this option will make it case sensitive.
So for example if you have the name "Program Files" and write "aM " in Replace and "-" in With the end result will be "Prog-Files", but if Match Case was checked it would be "Program Files" still.
Changes the case of the name.
This group has the following options:
-
Case: a dropdown menu with the options:
- Same: doesn't make any changes.
- Upper Case: makes the whole name upper case (e.g: from "abc" to "ABC")
- Lower Case: makes the whole name lower case (e.g: from "ABC" to "abc")
- Title: makes the name a title. That means each word separated by space gets the first character in upper case and the rest lower case and also characters after a "'" get upper case (e.g: from "ABc d'eF" to "Abc D'Ef")
- Sentence: makes the first character upper case if it's a letter and the rest lower case (e.g: from "abc DEF" to "Abc def")
Removes parts of the name.
This group has the following options:
- First n: with this option you can select a number of characters to remove from the start of the name. So with 0 no change is made, with 5 it would remove the first 5 characters.
- Last n: with this option you can select a number of characters to remove from the end of the name. So with 0 no change is made, with 5 it would remove the last 5 characters.
- From and To: this two options are tied together so you can select a number of characters to remove from X position up to Y. So with "From" 5 "To" 9 it would remove the 4 characters starting from the 5th character. "To" will always be greater than "From".
- Words: removes a word from the Name. Case sensitive.
- Chars.: removes any occurrence of any of the characters written in this text field. Case sensitive. So if you have the name "Program Files" and write "rm" in Chars the result will be "Poga Files"
-
Crop and the text entry next to it: "The text field" is from where to remove, and "Crop" is a dropdown menu with the next options:
- Before: removes anything before the first apparition of whatever is written in the text field, inclusive. Case sensitive
- After: removes anything after the first apparition of whatever is written in the text field, inclusive. Case sensitive
- Special: removes whatever is in the middle of the first apparition of the two parts separated by an asterisk of what is written in the text field, inclusive (e.g: with the name "Program Files" and "og* F" in the text field it would return "Priles"). Case sensitive
- Digits: if checked removes any digit
- Chars.: (a checkbox) if checked removes any letter
- Sym.: if checked removes any symbol
- D/S: if checked removes any occurrence of double spaces for a single space
- Accents: if checked removes any accented character for it's version without accent
-
Lead Dots: a dropdown menu to remove leading dots with the options:
- None: no change
- .: removes single leading dot
- ..: removes double leading dots
Move an specific amount of characters from one part of the name to another.
This group has the following options:
-
Copy: a dropdown menu that will take the characters selected with:
- None: no change
- Start: the number of characters selected in "Chars" from the start of the filename
- End: the number of characters selected in "Chars" from the end of the filename
- Chars.: the number of characters to take
-
Paste: a dropdown menu to select where to paste the selected characters with:
- Start: paste the characters at the start of the name
- End: paste the characters at the end of the name
- Position: paste the characters at the position selected with the "Pos." option
- Pos.: when the "Position" option is selected in "Paste" take this as what position to use
- Sep.: a text field to write whatever we may want to use as separator between what we have pasted and the rest of the name. The separator will be applied where necessary, that means when "Start" has been selected it will be after the pasted part, when "End" has been selected it will be before the pasted part, and when "Position" has been selected it will be before and after the selected part.
Extra characters to add. All this options can be used at the same time, you can add something at the start and something else at the end and so on.
This group has the following options:
- Prefix: add whatever we write in the text field at the start of the name
- Insert and At pos.: this two options will add what we write in the text field at the position selected with "At pos.". In "At pos." you can also use negative numbers, to start from the end
- Suffix: add whatever we write in the text field at the end of the name
- Word Space: if this is checked it will add a space before each upper case letter
This group will append what ever folder name the file is in to the filename itself. We can select where, a separator and how many folder levels.
This group has the following options:
-
Name: a dropdown menu to select where we want to put the folders name with the follwing options:
- Prefix: at the begining of the name
- Suffix: at the end of the name
- Position: at the position selected by "Pos."
- Pos.: at what position to add the folder name when "Position" has been selected in "Name"
- Sep.: what separator to use between each folder level
- Levels: the number of levels of folders to use.
So if for example we have "/home/user/Program Files" where we can see that the name is "Program Files", and we set "Name" to "Suffix" and the separator to be "_" with 2 "Levels" the result will be "Program Files_home_user"
Add numbering to the name by the order in which they appear in the file view.
This group has the following options:
-
Mode: a dropdown menu to select where to add the numbering with the options:
- None: no numbering is added
- Prefix: at the start of the name
- Suffix: at the end of the name
- Both: both at the start and the end of the name
- Position: at position set by "At"
- At: select at what position you want the numbering to be
- Start: from what number to start counting
- Incr.: by how much must the counting be increased with each element
- Pad.: how many left 0s (or a/As when using letters) to have. It will only put a 0 if the length of the number is smaller than the length of the number plus the padding. If you set a padding of "2", "0" will be "000" but "100" will still be "100"
- Sep.: what separator to use. It will put the separator where it's necessary like "Move Parts (6)" did.
-
Type: a dropdown menu to select what numbering to use with:
- Base 10: the basic base 10 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11...)
- Base 2: binary base (0, 1, 10, 11, 100, 101...)
- Base 8: octal base (0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12...)
- Base 16: hexadecimal base (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11...)
- Upper Case Letters: (A, B, C... AA, AB, AC...)
- Lower Case Letter: (a, b, c... aa, ab, ac...)
This is the only group that affects the extension of a file (or, like we said, the part after the last dot, even if its not an extension since there's no way to differentiate between them)
This group has the following options:
-
Unnamed dropdown: a dropdown menu to select what to do with the extension with:
- Same: keeps the same extension
- Lower: transforms the extension to lower case
- Upper: transforms the extension to upper case
- Title: transforms the extension to have the first and only first character upper case
- Extra: adds a new extra extension at the end from what we have written in the text field next to this dropdown menu
- Fixed: removes the extension and adds a new one from what we have written in the text field next to this dropdown menu
- Remove: removes the extension
- Unnamed Text Field: what you write in this text field will be used as an extension in the "Extra" and "Fixed" options in the "Unnamed dropdown".
In the lower right corner we find 4 buttons.
Applies the changes that are already being shown in the file view. Refreshes the "File View" and the selected folder in the "Directory Browser".
If you ever regret the changes you just made this button will undo the last rename. Won't undo further than that.
This button resets all the renaming groups to their defaults (like using all the "R" buttons in each group). Won't reset the "Filter File View".
This will directly apply the selected command to the selected items. You won't be able to preview the changes, although you will be able to undo the last command rename (but if you are applying a series of commands you will only be able to apply the last one that took effect).
If you have the libraries necessary for the metadata editing you can also use the metadata to dynamically rename the files. By adding "{tagname}" to the name that will be substituted with the value that item has for that tag. This can be used in any field in the "Rename Notebook Tab" as long as it ends with the "{tagname}" in the final name.
For example you could select "Name (2)" to have "Name" "Fixed" and the value of that be "{tracknumber} - {title}", and that would pull the values from each item.
You could use it as a separator in any of the appropriate fields, add it, replace with (both normally and in regular expressions), or even use it as an extension if you so desire.
A limitation is that you can't use it as a value to remove part of the name.
Batch-Pynamer wiki. Author: Alejandro Roldán