| Magic File Renamer 6.1

Index > Operation > Console Mode

Console mode allows you to perform automatic renaming from a command line, without graphical user interface.
You can, for example, use Windows Task Scheduler to rename/move files in a specific folder once in a while.
MFR 6 console mode comes as a stand alone application, MFRC.exe, which is located in the MFR installation folder.
Note that Command line parameters for MFR GUI mode cannot perform automatic renaming, but only add files to Rename List.
Automatic renaming is done using a predefined preset. You can use one of the saved presets or save a custom preset of filters to apply.
You must specify a preset name to use and file(s) to rename when running MFRC from command line.
Renaming log is saved also in console mode. You can access it using MFR's Log feature.
MFRC command line usage:
`MFRC /P:preset-name /A:filename|pathname|filemask [additional parameters]`
The `/A` parameter can be specified multiple times.

Parameter | Description
`/P:preset-name` | Use the specified preset of applied filters to perform the rename. Saved preset may also include auto-sort configuration if you want to sort the rename list before applying. A preset file with the same name should be found in the "\Presets" folder. The ".mps" extension should not be included. This parameter is required. See also: How to save a preset? Hint: for preset names with spaces, enclose the parameter in "..." like `"/P:my preset"`.
`/A:filename` | Add a single file to rename list. Local or full path is accepted.
`/A:pathname` | Add a single path to rename list. Local or full path is accepted. If `/R` is included, contents of the folder will be added.
`/A:filemask` | Add all files matching the specified wildcards to rename list.
`/F-` | Do not add file names to rename list. Only folder names will be added. (Default: OFF)
`/D+` | Add folder names to rename list. (Default: OFF)
`/R+` | Recursively add contents of sub-folders to rename list. Contents of a folder may be added even if folder itself is not added. (Default: OFF)
`/H+` | Include hidden and system files in rename list. (Default: OFF)
`/COPE` | Continue on preview errors. Unless this parameter is specified, rename operation will be canceled if errors occur during calculation of new names. If this parameter is specified, rename operation will continue, but items with errors will be ignored. (Default: OFF)
`/Confirm` | Requires a confirmation from the user for each single item rename. (Default: OFF)
`/S` | Silent mode. No output will be written to console. (Default: OFF)
`/V` | Verbose mode. Displays additional information in console. (Default: OFF)
`/Help` | Show this help document.

Exit Codes:

Code | Description
0 | Session completed successfully. (Rename errors still might have occurred)
1 | Session canceled: Invalid parameters.
2 | Session canceled: Failed to specified add files or folders.
3 | Session canceled: Failed to load specified preset.
4 | Session canceled: Error occurred while calculating new name for at least one file. (Use `/COPE` to ignore preview errors.)
5 | Error occurred while saving rename log.
99 | Other error occurred.

Examples:
`MFRC /P:counter /A:C:\Images /R+`
`MFRC "/P:Pretty Names" "/A:C:\My Music\*.mp3" /A:D:\music /R+ /COPE /V`
`"C:\Program Files\FineBytes\MFR6\MFRC" "/P:Random Names" /A:*.htm* /Confirm`