When using the image command to CONVERT an image. I am not able to control the name and extension using the TO argument.
There are times where I want to be able to control the extension, for example convert to a jpg, but make the extension .tbn instead if jpg.
If I try this code below, the result is a file called test.jpg, event though in the to I specify the output file name and extension.
Image CONVERT=jpg TO=test.tbn
Because of this I need to:
[ul]
[li]Check if the target .tbn file exists [/li]
[li]Delete the existing file[/li]
[li]Convert to jpg[/li]
[li]Rename from .jpg to .tbn[/li][/ul]
TO is for the destination location (path). There is ADDSUFFIX to append a string to the file basename and AS to specifiy a complete new filename, which sadly does not support any kind of patterns to make this work for batch operations.