Action list in batch processingbudz45 wrote:.. Perhaps in a future XnView MP you could consider adding a second or even third 'replace' function (so 3 in total) with perhaps the 2 extra hidden by default for a user to press to show them and use them. I've seen 2x replace functions in ShellToys 'batch rename' tool. ...
Batch processing works like this: You add actions from the palette of all available actions to your action list. For each action you set the action's parameter as desired to specify in detail what the action should do. This approach is very flexible and allows arbitrary combinations of the actions, including the application of the same action multiple times.
Action list in batch renaming?!
Perhaps batch renaming could work the same way: You have actions like Replace, Upper, Lower, and whatever, and you add them to an action list for renaming. Adding "Replace" two, three, or <n> times would no longer be a problem, then.
Functions that might be needed:
Add - for adding text to the existing text. Parameter: Fixed text and/or place holders
AddEnum - for adding an enumeration. Parameter: Enumeration type (Image, Page, Image in Directory, ...,) Start value. Step value.
Replace - for replacing a character or word with another character or word. Parameters: Search string, replace with string
Lower - for lowercasing the current text. Parameters: none
Upper - for uppercasing the current text. Parameters: none
Trim - for trimming leading and trailing spaces. Parameters: none
AddSub - for adding a substring of a text to the existing text. Parameters: start index. end index (optional)
Hmm, perhaps two action lists will be needed: One action list for the filename and one action list for the extension. Typically, the action list for extension contains {extension}, only.
An action list for renaming might look like this:
Add "MyImage_"
AddSub {filename}, 2
Add "_small"
The above action list would convert "P238238" to "MyImage_238238_small" for example.
This is what such an action list for batch rename might look like: Notes for the above draft:
- Example shows XnConvert, but the same would apply for XnView MP
- Preview of batch processing is placed to the right, but lacking of space preview of batch rename was moved to the bottom of the dialog.
- An empty action list means 'No action' / 'No change', no need to add action 'Add {filename}' explicitedly.
With the right functions and parameters available, this approach would make batch renaming really flexible. And using and offering the same user interface approach for batch processing and batch renaming is quite appealing. I'm not sure whether this concept is easy enough to pickup, though. What do people think about this approach?