I wrote a batch file with several invocations of nconvert (version 6.21, Win7 x64) to perform the individual steps, e.g. rotate, re-size, normalize, rename, add text.
It might make sense to use the batch a second time, after the first run was performed.
Then the batch does not work anymore, and nconvert deletes all images.
The malicious option is the -D option of nconvert.
The first run works perfectly, since the files are renamed, i.e. nconvert processes the input files into a new named file and deletes the input files afterwards.
The second run finds that input and output file name are exactly the same and the -D option irrevocably deletes all images.
Here's the line of the batch file:
Code: Select all
"C:\Program Files\nConvert\nconvert.exe" -v -normalize -autocontrast -autolevels -ratio -rtype lanczos -rflag decr -rflag orient -resize 1280 1024 -D -overwrite -out jpeg -o $\$$_###.jpg %1\*.jpg
After the first run, (and as input for the second run) the images are named zzzz_001.jpg, zzzz_002.jpg, etc.
I think the behavior of the -D option is quite strange, instead of deleting in the case that the input and output file is the same, it should NOT delete anything after the conversion. The current behavior is quite ZEN-like, create it and the final step of the creation is to destroy everything

Is it possible to fix that?
Or am I doing something wrong?
Or can another option be used to modify the -D behavior if input and output file are of the same name?