Difference between revisions of "ReNamer:Command Line"

From den4b Wiki
Jump to navigation Jump to search
(cleaned up)
(Updated links to ReNamer:Filter settings)
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
[[ReNamer]] supports several command line parameters. The general format is as follows:
 
[[ReNamer]] supports several command line parameters. The general format is as follows:
  
: '''"<nowiki>ReNamer.exe" <Parameters></nowiki>'''
+
: <code>"ReNamer.exe" &lt;parameters&gt;</code>
  
 
Please note that multiple parameter types cannot be combined together.
 
Please note that multiple parameter types cannot be combined together.
Line 14: Line 14:
  
 
|-
 
|-
|style="white-space:nowrap"| '''<nowiki><files></nowiki>'''
+
|style="white-space:nowrap"| <tt>&lt;files&gt;</tt>
 
| Paths to files and folders which will be automatically added to the program. Program's default settings will be used for adding folders. Masked paths can also be used, e.g. "C:\Pictures\*.jpg"
 
| Paths to files and folders which will be automatically added to the program. Program's default settings will be used for adding folders. Masked paths can also be used, e.g. "C:\Pictures\*.jpg"
  
 
|-
 
|-
|style="white-space:nowrap"| '''<nowiki>/preset <preset> <files></nowiki>'''
+
|style="white-space:nowrap"| <tt>/preset &lt;preset&gt; &lt;files&gt;</tt>
 
| Load preset specified by a preset name or a full path. Optionally, paths to files/folders can be appended to the end on this command, and they will be automatically added to the program.
 
| Load preset specified by a preset name or a full path. Optionally, paths to files/folders can be appended to the end on this command, and they will be automatically added to the program.
  
 
|-
 
|-
|style="white-space:nowrap"| '''<nowiki>/rename <preset> <files></nowiki>'''
+
|style="white-space:nowrap"| <tt>/rename &lt;preset&gt; &lt;files&gt;</tt>
 
| Load preset specified by a preset name or a full path and proceed with Preview and Rename actions. Upon successful Preview and Rename operations, program will close automatically. Otherwise, graphical user interface will become visible and an appropriate error message will be displayed. Paths to files/folders can be appended to the end on this command, and they will be automatically added to the program.
 
| Load preset specified by a preset name or a full path and proceed with Preview and Rename actions. Upon successful Preview and Rename operations, program will close automatically. Otherwise, graphical user interface will become visible and an appropriate error message will be displayed. Paths to files/folders can be appended to the end on this command, and they will be automatically added to the program.
  
 
|-
 
|-
|style="white-space:nowrap"| '''<nowiki>/enqueue <files></nowiki>'''
+
|style="white-space:nowrap"| <tt>/silent /rename &lt;preset&gt; &lt;files&gt;</tt>
 +
| Unattended command line renaming. Operation is similar to <tt>/rename &lt;preset&gt; &lt;files&gt;</tt>, but any warnings or errors will be silently discarded. Graphical user interface will not be shown. A non-zero exit code is returned upon completion if any warnings or errors have occurred.<br/>''Added in v6.6.0.5 Beta.''
 +
 
 +
|-
 +
|style="white-space:nowrap"| <tt>/enqueue &lt;files&gt;</tt>
 
| Add following files/folders to already running instance of the program. If no running instance is found - launch a new one.
 
| Add following files/folders to already running instance of the program. If no running instance is found - launch a new one.
  
 
|-
 
|-
|style="white-space:nowrap"| '''<nowiki>/list <files></nowiki>'''
+
|style="white-space:nowrap"| <tt>/list &lt;files&gt;</tt>
 
| Load a list of files/folders from the following list files.
 
| Load a list of files/folders from the following list files.
  
 
|-
 
|-
|style="white-space:nowrap"| '''/uninstall'''
+
|style="white-space:nowrap"| <tt>/uninstall</tt>
 
| Remove all manually turned on associations with the program, e.g. presets association. For advanced users only!
 
| Remove all manually turned on associations with the program, e.g. presets association. For advanced users only!
  
Line 41: Line 45:
 
Examples:
 
Examples:
  
* '''"ReNamer.exe" /enqueue "C:\Folder" "C:\Pictures\*.jpg" '''<br/> This command will add to already running instance of the program contents of folder "C:\Folder" (depending on the default settings) and all *.JPG files from folder "C:\Pictures".
+
* <code>"ReNamer.exe" /enqueue "C:\Folder" "C:\Pictures\*.jpg"</code>
 +
*: This command will add to already running instance of the program contents of folder "C:\Folder" (depending on the default settings) and all *.JPG files from folder "C:\Pictures".
  
* '''"ReNamer.exe" /preset "MyRules" "C:\Folder" '''<br/> This command will launch a new instance of the program, will load the preset with the name "MyRules", and will add contents of folder "C:\Folder" (depending on the default settings).
+
* <code>"ReNamer.exe" /preset "MyRules" "C:\Folder"</code>
 +
*: This command will launch a new instance of the program, will load the preset with the name "MyRules", and will add contents of folder "C:\Folder" (depending on the default settings).
  
* '''"ReNamer.exe" /rename "MyRules" "C:\Folder" '''<br/> This command will launch a new instance of the program, will load the preset with the name "MyRules", will add contents of folder "C:\Folder" (depending on the default settings), and will execute Preview and Rename operations (program will close upon successful completion of all operations).
+
* <code>"ReNamer.exe" /rename "MyRules" "C:\Folder"</code>
 +
*: This command will launch a new instance of the program, will load the preset with the name "MyRules", will add contents of folder "C:\Folder" (depending on the default settings), and will execute Preview and Rename operations (program will close upon successful completion of all operations).
  
* '''"ReNamer.exe" /list "List1.txt" "List2.txt"'''<br/> Where "List1.txt" and "List2.txt" are lists of files (one per line), with absolute or relative paths (relative to the list file). The contained paths will be loaded into ReNamer.
+
* <code>"ReNamer.exe" /list "List1.txt" "List2.txt"</code>
 +
*: Where "List1.txt" and "List2.txt" are lists of files (one per line), with absolute or relative paths (relative to the list file). The contained paths will be loaded into ReNamer.
  
 
== Extended description ==
 
== Extended description ==
Line 57: Line 65:
  
 
|-
 
|-
|style="white-space:nowrap"| '''&lt;files&gt;'''
+
|style="white-space:nowrap"| <tt>&lt;files&gt;</tt>
 
|  
 
|  
 
Launch ReNamer and add all files to the '''Files''' pane. You will have to finish the rest of the steps yourself: [[ReNamer:Managing rules|add rules]], [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them. While composing the command, replace '''&lt;files&gt;''' with the absolute paths to files and folders to be renamed. Use a space to separate the entries in the list.
 
Launch ReNamer and add all files to the '''Files''' pane. You will have to finish the rest of the steps yourself: [[ReNamer:Managing rules|add rules]], [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them. While composing the command, replace '''&lt;files&gt;''' with the absolute paths to files and folders to be renamed. Use a space to separate the entries in the list.
  
 
* Even if a Renamer window is already running, this command will always launch a new window.  
 
* Even if a Renamer window is already running, this command will always launch a new window.  
* When adding folders, ReNamer's [[ReNamer:Menus for the Files pane#Filters_menu|'''Filter''' settings]] will be used.  
+
* When adding folders, ReNamer's [[ReNamer:Filter settings|Filter settings]] will be used.  
 
* Masked paths can also be used, e.g. "C:\Pictures\*.jpg"
 
* Masked paths can also be used, e.g. "C:\Pictures\*.jpg"
  
Line 68: Line 76:
 
'''Example:''' <code>"ReNamer.exe" "C:\Folder" "C:\Pictures\*.jpg"</code>
 
'''Example:''' <code>"ReNamer.exe" "C:\Folder" "C:\Pictures\*.jpg"</code>
  
* This command will launch ReNamer, and add contents of folder "C:\Folder" (depending on the [[ReNamer:Menus for the Files pane#Filters_menu|'''Filter''' settings]]) and all *.JPG files from folder "C:\Pictures" to its '''Files''' pane. Now [[ReNamer:Managing rules|add rules]], [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them.
+
* This command will launch ReNamer, and add contents of folder "C:\Folder" (depending on the [[ReNamer:Filter settings|Filter settings]]) and all *.JPG files from folder "C:\Pictures" to its '''Files''' pane. Now [[ReNamer:Managing rules|add rules]], [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them.
  
  
Line 74: Line 82:
  
 
|-
 
|-
|style="white-space:nowrap"| '''/preset &lt;preset&gt; &lt;files&gt;'''
+
|style="white-space:nowrap"| <tt>/preset &lt;preset&gt; &lt;files&gt;</tt>
 
|  
 
|  
 
Launch ReNamer and load the preset specified by a [[ReNamer:Using presets|preset]] name or a full path to the preset file. (The '''/preset''' part is a ''literal ''- enter it just as shown.) You will have to finish the rest of the steps yourself: [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them.
 
Launch ReNamer and load the preset specified by a [[ReNamer:Using presets|preset]] name or a full path to the preset file. (The '''/preset''' part is a ''literal ''- enter it just as shown.) You will have to finish the rest of the steps yourself: [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them.
Line 83: Line 91:
 
'''Example:''' <code>"ReNamer.exe" /preset "MyRules" "C:\Folder"</code>
 
'''Example:''' <code>"ReNamer.exe" /preset "MyRules" "C:\Folder"</code>
  
* This command will launch a new ReNamer window, load the preset with the name "MyRules", and add contents of folder "C:\Folder" to the '''Files '''pane (depending on the [[ReNamer:Menus for the Files pane#Filters_menu|'''Filter''' settings]]). You can [[ReNamer:Adding files and folders|add even more files and folders]]. Now [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them.
+
* This command will launch a new ReNamer window, load the preset with the name "MyRules", and add contents of folder "C:\Folder" to the '''Files '''pane (depending on the [[ReNamer:Filter settings|Filter settings]]). You can [[ReNamer:Adding files and folders|add even more files and folders]]. Now [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them.
  
 
|-
 
|-
|style="white-space:nowrap"| '''/rename &lt;preset&gt; &lt;files&gt;'''
+
|style="white-space:nowrap"| <tt>/rename &lt;preset&gt; &lt;files&gt;</tt>
 
|  
 
|  
 
Launch ReNamer, load [[ReNamer:Using presets|preset]] specified by a preset name or a full path to the preset file, add the files and folders listed at the end on this command line, and then proceed with [[ReNamer:Previewing files|Preview]] and [[ReNamer:Renaming files|Rename]] actions. (The '''/rename''' part is a ''literal ''- enter it just as shown.)  
 
Launch ReNamer, load [[ReNamer:Using presets|preset]] specified by a preset name or a full path to the preset file, add the files and folders listed at the end on this command line, and then proceed with [[ReNamer:Previewing files|Preview]] and [[ReNamer:Renaming files|Rename]] actions. (The '''/rename''' part is a ''literal ''- enter it just as shown.)  
Line 96: Line 104:
  
  
'''Example: <code>"ReNamer.exe" /rename "MyRules" "C:\Folder"</code>
+
'''Example:''' <code>"ReNamer.exe" /rename "MyRules" "C:\Folder"</code>
  
* This command will launch a new ReNamer window, load the preset with the name "MyRules", add contents of folder "C:\Folder" to the '''Files '''pane (depending on the [[ReNamer:Menus for the Files pane#Filters_menu|'''Filter''' settings]]), and execute [[ReNamer:Previewing files|preview]] and [[ReNamer:Renaming files|rename]] operations.
+
* This command will launch a new ReNamer window, load the preset with the name "MyRules", add contents of folder "C:\Folder" to the '''Files '''pane (depending on the [[ReNamer:Filter settings|Filter settings]]), and execute [[ReNamer:Previewing files|preview]] and [[ReNamer:Renaming files|rename]] operations.
 
* The ReNamer window will be closed if the renaming is successful. But if there are any errors in preview/renaming, the window will stay open and display the error message. You will have to take the appropriate action and then finish the renaming.
 
* The ReNamer window will be closed if the renaming is successful. But if there are any errors in preview/renaming, the window will stay open and display the error message. You will have to take the appropriate action and then finish the renaming.
  
 
|-
 
|-
|style="white-space:nowrap"| '''/enqueue &lt;files&gt;'''
+
|style="white-space:nowrap"| <tt>/enqueue &lt;files&gt;</tt>
 
|  
 
|  
 
Add the listed files/folders to an already running instance of ReNamer. If no running instance is found, launch a new one. (The '''/enqueue''' part is a ''literal ''- enter it just as shown.)  
 
Add the listed files/folders to an already running instance of ReNamer. If no running instance is found, launch a new one. (The '''/enqueue''' part is a ''literal ''- enter it just as shown.)  
Line 109: Line 117:
 
'''Example:''' <code>"ReNamer.exe" /enqueue "C:\Folder" "C:\Pictures\*.jpg"</code>
 
'''Example:''' <code>"ReNamer.exe" /enqueue "C:\Folder" "C:\Pictures\*.jpg"</code>
  
* This command will check if a ReNamer window is already running. If it is found, it will add the contents of folder "C:\Folder" to the '''Files''' pane (depending on the [[ReNamer:Menus for the Files pane#Filters_menu|'''Filter''' settings]]) and all *.JPG files from folder "C:\Pictures". You can [[ReNamer:Adding files and folders|add even more files and folders]]. Now you will have to [[ReNamer:Managing rules|add rules]], [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them.  
+
* This command will check if a ReNamer window is already running. If it is found, it will add the contents of folder "C:\Folder" to the '''Files''' pane (depending on the [[ReNamer:Filter settings|Filter settings]]) and all *.JPG files from folder "C:\Pictures". You can [[ReNamer:Adding files and folders|add even more files and folders]]. Now you will have to [[ReNamer:Managing rules|add rules]], [[ReNamer:Previewing files|preview the items]] and [[ReNamer:Renaming files|rename]] them.  
 
* If ReNamer is not already running, this command will launch new ReNamer instance and folllow the process described above.
 
* If ReNamer is not already running, this command will launch new ReNamer instance and folllow the process described above.
  
 
|-
 
|-
|style="white-space:nowrap"| '''/list &lt;files&gt;'''
+
|style="white-space:nowrap"| <tt>/list &lt;files&gt;</tt>
 
|  
 
|  
 
Load a list of files/folders from the ''list files'' that follow the command. (The '''/list''' part is a ''literal ''- enter it just as shown.)  
 
Load a list of files/folders from the ''list files'' that follow the command. (The '''/list''' part is a ''literal ''- enter it just as shown.)  
Line 126: Line 134:
  
 
|-
 
|-
|style="white-space:nowrap"| '''/uninstall'''
+
|style="white-space:nowrap"| <tt>/uninstall</tt>
 
|  
 
|  
 
Remove all manually turned on associations with the program, e.g. [[ReNamer:Program settings#Miscellaneous_settings|presets association]]. (The '''/uninstall''' part is a ''literal'' - enter it just as shown.)  
 
Remove all manually turned on associations with the program, e.g. [[ReNamer:Program settings#Miscellaneous_settings|presets association]]. (The '''/uninstall''' part is a ''literal'' - enter it just as shown.)  
Line 138: Line 146:
  
 
# Add the path of the ReNamer executable to the Windows <tt>PATH</tt> environment variable. After that, you can use the commands as shown above.
 
# Add the path of the ReNamer executable to the Windows <tt>PATH</tt> environment variable. After that, you can use the commands as shown above.
# Use the full path to the ReNamer executable in the command line, e.g. '''"C:\Tools\ReNamer\ReNamer.exe" /list "List1.txt" "List2.txt"'''.
+
# Use the full path to the ReNamer executable in the command line, e.g. <code>"C:\Tools\ReNamer\ReNamer.exe" /list "List1.txt" "List2.txt"</code>.
  
 
== Tricks with command line ==
 
== Tricks with command line ==
Line 170: Line 178:
  
 
|}
 
|}
 +
 
[[Category:ReNamer]]
 
[[Category:ReNamer]]

Latest revision as of 16:07, 6 July 2019

Arrow Return.png ReNamer  

ReNamer supports several command line parameters. The general format is as follows:

"ReNamer.exe" <parameters>

Please note that multiple parameter types cannot be combined together.

Short description

Parameter Description
<files> Paths to files and folders which will be automatically added to the program. Program's default settings will be used for adding folders. Masked paths can also be used, e.g. "C:\Pictures\*.jpg"
/preset <preset> <files> Load preset specified by a preset name or a full path. Optionally, paths to files/folders can be appended to the end on this command, and they will be automatically added to the program.
/rename <preset> <files> Load preset specified by a preset name or a full path and proceed with Preview and Rename actions. Upon successful Preview and Rename operations, program will close automatically. Otherwise, graphical user interface will become visible and an appropriate error message will be displayed. Paths to files/folders can be appended to the end on this command, and they will be automatically added to the program.
/silent /rename <preset> <files> Unattended command line renaming. Operation is similar to /rename <preset> <files>, but any warnings or errors will be silently discarded. Graphical user interface will not be shown. A non-zero exit code is returned upon completion if any warnings or errors have occurred.
Added in v6.6.0.5 Beta.
/enqueue <files> Add following files/folders to already running instance of the program. If no running instance is found - launch a new one.
/list <files> Load a list of files/folders from the following list files.
/uninstall Remove all manually turned on associations with the program, e.g. presets association. For advanced users only!

Examples:

  • "ReNamer.exe" /enqueue "C:\Folder" "C:\Pictures\*.jpg"
    This command will add to already running instance of the program contents of folder "C:\Folder" (depending on the default settings) and all *.JPG files from folder "C:\Pictures".
  • "ReNamer.exe" /preset "MyRules" "C:\Folder"
    This command will launch a new instance of the program, will load the preset with the name "MyRules", and will add contents of folder "C:\Folder" (depending on the default settings).
  • "ReNamer.exe" /rename "MyRules" "C:\Folder"
    This command will launch a new instance of the program, will load the preset with the name "MyRules", will add contents of folder "C:\Folder" (depending on the default settings), and will execute Preview and Rename operations (program will close upon successful completion of all operations).
  • "ReNamer.exe" /list "List1.txt" "List2.txt"
    Where "List1.txt" and "List2.txt" are lists of files (one per line), with absolute or relative paths (relative to the list file). The contained paths will be loaded into ReNamer.

Extended description

Parameters Description
<files>

Launch ReNamer and add all files to the Files pane. You will have to finish the rest of the steps yourself: add rules, preview the items and rename them. While composing the command, replace <files> with the absolute paths to files and folders to be renamed. Use a space to separate the entries in the list.

  • Even if a Renamer window is already running, this command will always launch a new window.
  • When adding folders, ReNamer's Filter settings will be used.
  • Masked paths can also be used, e.g. "C:\Pictures\*.jpg"


Example: "ReNamer.exe" "C:\Folder" "C:\Pictures\*.jpg"


Note: This explanation applies to all the commands given below wherever <files> parameter is used.

/preset <preset> <files>

Launch ReNamer and load the preset specified by a preset name or a full path to the preset file. (The /preset part is a literal - enter it just as shown.) You will have to finish the rest of the steps yourself: preview the items and rename them.

  • The <files> parameter (explained above) is optional.


Example: "ReNamer.exe" /preset "MyRules" "C:\Folder"

/rename <preset> <files>

Launch ReNamer, load preset specified by a preset name or a full path to the preset file, add the files and folders listed at the end on this command line, and then proceed with Preview and Rename actions. (The /rename part is a literal - enter it just as shown.)

ReNamer's behavior changes basing on whether there are any problems during renaming.

  • If the Preview and Rename operations are successful, ReNamer window will be closed automatically.
  • If there are any errors, ReNamer's main window will stay open and an appropriate error message will be displayed.


Example: "ReNamer.exe" /rename "MyRules" "C:\Folder"

  • This command will launch a new ReNamer window, load the preset with the name "MyRules", add contents of folder "C:\Folder" to the Files pane (depending on the Filter settings), and execute preview and rename operations.
  • The ReNamer window will be closed if the renaming is successful. But if there are any errors in preview/renaming, the window will stay open and display the error message. You will have to take the appropriate action and then finish the renaming.
/enqueue <files>

Add the listed files/folders to an already running instance of ReNamer. If no running instance is found, launch a new one. (The /enqueue part is a literal - enter it just as shown.)


Example: "ReNamer.exe" /enqueue "C:\Folder" "C:\Pictures\*.jpg"

  • This command will check if a ReNamer window is already running. If it is found, it will add the contents of folder "C:\Folder" to the Files pane (depending on the Filter settings) and all *.JPG files from folder "C:\Pictures". You can add even more files and folders. Now you will have to add rules, preview the items and rename them.
  • If ReNamer is not already running, this command will launch new ReNamer instance and folllow the process described above.
/list <files>

Load a list of files/folders from the list files that follow the command. (The /list part is a literal - enter it just as shown.)

  • A list file is a text file that contains a list of filepaths (one file per line).
  • The paths can be absolute or relative (when relative path is used, the reference is the list file and not the ReNamer executable).


Example: "ReNamer.exe" /list "List1.txt" "List2.txt"

  • The "List1.txt" and "List2.txt" are two text files. Each list file contains a list of files, which are listed in the form of absolute or relative paths. The command loads files listed in List1.txt and List2.txt into the Files pane of ReNamer.
/uninstall

Remove all manually turned on associations with the program, e.g. presets association. (The /uninstall part is a literal - enter it just as shown.)


Example: "ReNamer.exe" /uninstall

The examples shown above do not include the full path to "ReNamer.exe" as it can differ between installations. To make these commands work on your computer you have a choice of either:

  1. Add the path of the ReNamer executable to the Windows PATH environment variable. After that, you can use the commands as shown above.
  2. Use the full path to the ReNamer executable in the command line, e.g. "C:\Tools\ReNamer\ReNamer.exe" /list "List1.txt" "List2.txt".

Tricks with command line

You can exploit the command line in two different ways:

Application How
Launch ReNamer with options

Normally, you launch ReNamer from the Quick Launch bar. At such times, it starts without any rules. But you can launch ReNamer with any of the parameters shown in the table above.

Here is the trick:

  1. Right-click on the ReNamer icon (typically located on Desktop or in the Quick Launch Bar).
  2. A menu pops up. Select the last option ("Properties"). A window pops up.
  3. Select the Shortcut tab. In the Target input box, enter the command line you want.
  4. Press OK.

From now on, whenever you click on the icon, ReNamer will be launched with all the options you've selected.

Tip: You can create multiple copies of the icons in your Quick Launch Bar, Desktop or Menu START, and then assign a different command line to each icon.

Launch ReNamer from other applications

Many applications allow you to launch Windows commands. In such cases, you can select different files in that application and then invoke ReNamer from the command line mode. This will allow you to rename selected files directly, without having to add them to ReNamer's Files pane first.