Page 1 of 1

Command line parameters

Posted: 2015-12-01T05:10:43-07:00
by theboywonder
Hi
I need a process to convert TIF images to two different JPG formats, each in there own subfolder. I am suspecting this will be two separate command line tasks?

I'd be grateful if anyone can offer some guidance. I have read the Command Line usage guide, but I am not familiar with command line usage.

Source: TIFF, in folder c:\TIFFs\
Destination 1: JPG, 72dpi, width no more than 1148px, save in folder 'c:\tiffs\JPG1\'
Destination 1: JPG, 72dpi, width no more than 150px, save in folder 'c:\tiffs\JPG2\'

Filename to remain the same.

Any help is appreciated.

Re: Command line parameters

Posted: 2015-12-01T05:39:28-07:00
by Bonzo
I would try this BUT I am not sure how to keep the filename the same.

Code: Select all

input.jpg ( -clone 0 -thumbnail 1148px -write "c:\tiffs\JPG1\output.jpg" +delete ) -thumbnail 150x "c:\tiffs\JPG2\output.jpg" null:

Re: Command line parameters

Posted: 2015-12-01T05:46:30-07:00
by theboywonder
This is what I have so far, but I need the output to be in a subfolder...

Code: Select all

convert *.TIF -units PixelsPerInch -resize 1148 -density 72 -set filename:out %t %[filename:out].jpg

Re: Command line parameters

Posted: 2015-12-01T10:40:39-07:00
by fmw42
You will need to write a script loop over each input TIFF and use bonzo's solution with your -set filename. Put the -set filename just after reading the input and before the parenthesis.