Difference between revisions of "ReNamer:Rules:Serialize"

From den4b Wiki
Jump to: navigation, search
(Serialize Rule: decremental indexes)
(Updated to bring in line with ReNamer 6.6.0.5 Beta)
Line 1: Line 1:
{{Go|up=ReNamer:Rules|prev=ReNamer:Rules:Case|next=ReNamer:Rules:CleanUp}}
+
{{Go|up=ReNamer:Rules|prev=ReNamer:Rules:Case|next=ReNamer:Rules:Randomize}}
  
 
== Serialize Rule ==
 
== Serialize Rule ==
Line 5: Line 5:
 
[[Image:SerializeRule.png|center]]
 
[[Image:SerializeRule.png|center]]
  
This rule works on a set of files, and inserts incremental numeric series or random sequences of digits in the names of those filenames.
+
This rule works on a set of files, and inserts incremental numeric series of digits in the names of those filenames.
  
When the ''incremental'' option is chosen, the files listed in the pane are numbered in ascending order. Thus, the position of the file in the '''Files''' pane becomes important. Check the order of the files in the list before applying this rule.
+
The files listed in the pane can be numbered in increasing or decreasing order, with various steps, repeat and reset configuration. The position of each file in the '''Files''' pane becomes important, so check the order of the files in the list before applying this rule.
  
 
Examples:
 
Examples:
Line 21: Line 21:
  
 
|-
 
|-
| Incremental
 
| Inserts serialized numbers in the names of the files placed in the Files pane of ReNamer.
 
 
{| class="wikitable"
 
 
| Index start
 
| Index start
| Starting number. If the folder already has some files with serialized numbers, start with the next number.
+
| Starting number. For example, if the destination folder already has some files with serialized numbers, you can start with the next number.
  
 
|-
 
|-
 
| Step
 
| Step
| Usually 1, but you may like to enter a higher number here if files with intermediate numbers are expected later. Also, negative numbers can be used to make decremental indexes, e.g. -1, -2, -3, etc.
+
| Increment the index by this value after each processed file. Usually 1, but you may like to enter a higher number here if files with intermediate numbers are expected later. Also, negative numbers can be used to make decremental indexes, e.g. -1, -2, -3, etc.
  
 
|-
 
|-
| Reset if folder changes
+
| Repeat
| Since ReNamer can work on files collected from multiple folders, this control allows you to reset the counter for each of those folders. The effect is as if you are repeating the same commend for each of the folders separately.
+
| How many times to repeat (reuse) the same index before incrementing it.
 
 
|}
 
  
 
|-
 
|-
| Random
+
| Reset every
| Inserts a random number in the file name.
+
| Reset index to the initial value after processing this many files.
 
 
{| class="wikitable"
 
| Length
 
| Specify how many digits your random number should have.  
 
 
 
* ReNamer will create random numbers with specified length (number of digits). So a length of 4 means the random digits will be from 0000 to 9999 (inclusive).
 
 
 
* Note that random numbers are padded with leading zeroes by default
 
  
 
|-
 
|-
| Unique if possible
+
| Reset if folder changes
| Normally, random numbers can repeat themselves. If this option is selected, ReNamer will try to use unique numbers.  
+
| Since ReNamer can work on files collected from multiple folders, this control allows you to reset the counter for each of those folders. The effect is as if you are repeating the same command for each of the folders separately.
 
 
|}
 
  
 
|-
 
|-
| Pad with zeros to reach length
+
| Pad with zeros to length
| ReNamer will pad the remaining places with leading zeros. For example 457 becomes 000457 if it is padded to reach 6 digits, and 0457 if padded to 4 digits.
+
| Pad the inserted number with leading zeros. For example, "457" becomes "000457" if it is padded to reach 6 digits, and "0457" if padded to 4 digits.
  
 
|-
 
|-
Line 71: Line 55:
 
| Suffix
 
| Suffix
 
| After the original filename
 
| After the original filename
 
* If the '''skip extension''' option is selected, the specified text will be inserted ''before'' the extension.
 
  
 
|-
 
|-
 
| Position
 
| Position
 
| Insert the number at the specified position.
 
| Insert the number at the specified position.
 +
 +
|-
 +
| Replace current name
 +
| Inserted number replaces the entire filename.
 +
 +
|-
 +
| Skip extension
 +
| Exclude file extension when calculating the position for insertion.
  
 
|}
 
|}
Note that if the "''pad with zeros''" option (above) is selected, the ''padded '' number is inserted.
 
  
 
|}
 
|}
  
 
[[Category:ReNamer]]
 
[[Category:ReNamer]]

Revision as of 12:12, 5 February 2017

Serialize Rule

SerializeRule.png

This rule works on a set of files, and inserts incremental numeric series of digits in the names of those filenames.

The files listed in the pane can be numbered in increasing or decreasing order, with various steps, repeat and reset configuration. The position of each file in the Files pane becomes important, so check the order of the files in the list before applying this rule.

Examples:

  1. You have a bunch of log files, and you want to make them look like "log0001", "log0002", "log0003", etc.
  2. You want to force specific sorting for files: "01 - Song XYZ", "02 - Song ABC", "03 - Song YYY", etc.

The parameters are as follows:

Parameter Details
Index start Starting number. For example, if the destination folder already has some files with serialized numbers, you can start with the next number.
Step Increment the index by this value after each processed file. Usually 1, but you may like to enter a higher number here if files with intermediate numbers are expected later. Also, negative numbers can be used to make decremental indexes, e.g. -1, -2, -3, etc.
Repeat How many times to repeat (reuse) the same index before incrementing it.
Reset every Reset index to the initial value after processing this many files.
Reset if folder changes Since ReNamer can work on files collected from multiple folders, this control allows you to reset the counter for each of those folders. The effect is as if you are repeating the same command for each of the folders separately.
Pad with zeros to length Pad the inserted number with leading zeros. For example, "457" becomes "000457" if it is padded to reach 6 digits, and "0457" if padded to 4 digits.
Insert where Specify where to insert the number.
Prefix Before the original filename
Suffix After the original filename
Position Insert the number at the specified position.
Replace current name Inserted number replaces the entire filename.
Skip extension Exclude file extension when calculating the position for insertion.