Using different input and output directories

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, xnview

agdabn
Posts: 10
Joined: Tue Mar 02, 2021 9:30 am

Re: Using different input and output directories

Post by agdabn »

Yes, you're right!

I used -rmeta and -rexifthumb to remove the metadata. instead of-clean 95
I figured out how to make different folders of input and output files. here is the Code:

Code: Select all

@chcp 1251
@for /R "D:\images_input\" %%I in (*.jp*) do D:\NConvert\nconvert -ratio -rtype lanczos -rflag decr -rflag orient -resize 500 500 -sharpen 50 -dpi 96 -q 70 -rmeta -rexifthumb -o D:\images_Output\%%~nI %%I
I still can't find the parameter of this button:
Replace.jpg
Replace.jpg (52.16 KiB) Viewed 431 times
cday
XnThusiast
Posts: 2905
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Using different input and output directories

Post by cday »

agdabn wrote: Wed Mar 03, 2021 9:46 pm I still can't find the parameter of this button:
Replace.jpg
The new file will replace the existing file if you use the -D option suggested earlier... :D

Code: Select all

  -D                : Delete original picture
Always test with copies of files!

I'll look again at the rest of your post later.
agdabn
Posts: 10
Joined: Tue Mar 02, 2021 9:30 am

Re: Using different input and output directories

Post by agdabn »

In this case,- D will not help.
After all, the original file is located in a different directory. And the replacement is necessary in the Output folder. I.e. if there is already a file with this name in the Output folder, then it must be replaced.
cday
XnThusiast
Posts: 2905
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Using different input and output directories

Post by cday »

agdabn wrote: Wed Mar 03, 2021 10:20 pm In this case,- D will not help.
After all, the original file is located in a different directory. And the replacement is necessary in the Output folder. I.e. if there is already a file with this name in the Output folder, then it must be replaced.
Alright, not the same thing... :(

Maybe this option, I've never used it, or even noticed it before:

Code: Select all

 -overwrite        : Overwrite existing file

Always test with copies of files!
agdabn
Posts: 10
Joined: Tue Mar 02, 2021 9:30 am

Re: Using different input and output directories

Post by agdabn »

YES, super
Thank you very much.
Now everything works as it should. Final variation:

Code: Select all

@chcp 1251
@for /R "D:\images_Input\" %%I in (*.jp*) do D:\NConvert\nconvert -ratio -rtype lanczos -rflag decr -rflag orient -resize 500 500 -sharpen 50 -dpi 96 -q 70 -overwrite -rmeta -rexifthumb -o D:\images_Out\%%~nI %%I
Post Reply