Page 1 of 1

Transform image and save as same filename

Posted: Sun Jun 23, 2013 1:36 pm
by uraeus1618
Hi,
It's been a few years since i used nconvert so forgive my rustiness,
I'm trying to rotate an image +90 degrees and retain the same file name. That is I don't wish a copy made like image_1.jpg eg
Using 32 and 64 bit versions on 64bit vista
nconvert -rotate 90 image.jpg
I tried
nconvert -rotate 90 image.jpg -o image.jpg [can't open file -o] saves a numbered file
nconvert -rotate 90 image.jpg -overwrite [can't open file -o]
nconvert -rotate 90 image.jpg -o image.jpg -overwrite [can't open file -o] saves a numbered file
and in desperation
nconvert -rotate 90 image.jpg -o image.jpg -D [just laughs at me]

In this link http://newsgroup.xnview.com/viewtopic.php?t=349
we get
"NConvert overwrites existing files by default. Therefore there is no special parameter to force NConvert overwriting files available."
It's an old post though.

Is there a way through this? I don't mind using a placeholder/temporary file but i thought i'd try a simple solution first
thank you
And thanks for a fantastic piece of art

Re: Transform image and save as same filename

Posted: Sun Jun 23, 2013 4:42 pm
by cday
The following works with a recent version of NConvert:

nconvert -rotate 90 -overwrite image.jpg

In the NConvert syntax the file or files to be processed come last, and -o is only required if the output file is to have a new file name or extension, I believe. I don't know the history of overwriting files in NConvert, but -overwrite is included in the current -help listing.

Re: Transform image and save as same filename

Posted: Mon Jun 24, 2013 7:00 am
by uraeus1618
Now that's much better, thank you cday