How to include rename operation in batch processing scripts?

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
circle.hk
Posts: 4
Joined: Tue Jul 15, 2008 10:27 am

How to include rename operation in batch processing scripts?

Post by circle.hk »

Hi there,

I am new to here. I have used XnView for some time and I am quite satisfied with it.

However, I've got a some questions/suggestions on it.

First of all, how can I include rename operation in batch processing scripts? I usually use XnView to resize my photo in different size, and rename it accordingly. For example, I have a few scripts defined: "Resize to 1600x1200", "Resize to 1024x768", and "Resize to 800x600". Then I will name the files to "IMAGE_resized_1600x1200.JPG", "IMAGE_resized_1024x768.JPG" and "IMAGE_resized_800x600.JPG" respectively. In the version of XnView I am using, I have to first resize it using batch processing, then select all IMAGE_1.JPG files, then perform a batch rename. Are there any ways to include also this rename operation in the batch process scripts? I think this would be useful to many users who have similar habits as me. Instead of adding a "rename" operation in the script, this may also be achieved by allowing users to specify the output file name format.

I also have a suggestion in resizing. It may be a good idea to allow an consistent dialog boxes for renaming single file and multiple files (batch renaming). It would be handy because some users like me may want to use the same stored renaming template, even for single files, so that they don't want to retype it again.

My another suggestion in resizing is to allow a more flexible renaming templates. For example, current pattern matching scheme does not allow including the file extension to be part of the pattern. For example, when I want to rename the default output file name of XnView after batch processing (e.g. "Filename_1.jpg"), i can only replace the string "_1" to what I want. However this may cause error if the origin file name contains the string "_1". For example, if the original file is "img_100.jpg", after batch processing it is "img_100_1.jpg", and after batch renaming it will be "img_resized000_resized.jpg", which is probably not what user desired. Possible solution can be regular expression support or simply including both file name and extension in batch renaming.

Thanks for reading!

circle.hk
Post Reply