Page 1 of 1
Batch-convert single tiffs to multipage tiffs...
Posted: Wed Jun 25, 2008 3:46 pm
by firestar
Hello,
I want to know how to batch-convert single tiffs from separate directories to multipage tiffs using xnview.
the directory structure is as follows:
dir1
subdir
|- img1.tiff
|- img2.tiff
|- img3.tiff
dir2
subdir
|- img1.tiff
|- img2.tiff
|- img3.tiff
I've got 1600 directories (dirs) to convert. What I want is that all tiffs in a directory are taken and converted into a multipage tiff named like the directory (dir1, dir2, etc..) then the next directory is processed, using batch-convert.
Q: Is this possible?
Q: Which program can do this job
Please respond, the job is really huge.
Thanks
Posted: Wed Jun 25, 2008 7:56 pm
by Peter2
Maybe you can you "nconvert" with a self-edited batch file?
Take one dir, make a "batch conversion", save it to "bat", take the batch as example for all other dirs and make a huge batch with all dirs.
Maybe ..??
Peter
Posted: Thu Jun 26, 2008 4:46 pm
by Guest
Hm, I will look into nconvert. I don't know yet if it has multipage TIFF options though. Problem is how to extract the directory names to paste into a batchfile quickly.
Peter, isn't there any other solution?
Posted: Thu Jun 26, 2008 5:05 pm
by Peter2
Anonymous wrote:Hm, I will look into nconvert. I don't know yet if it has multipage TIFF options though.
I think you are right
Anonymous wrote:.. Problem is how to extract the directory names to paste into a batchfile quickly...
With dir-commands, print to txt, and edit with excel and texteditor.
Anonymous wrote:...Peter, isn't there any other solution?
Sorry - no idea. Maybe with Adobe Professional or something like that?
Peter
Posted: Thu Jun 26, 2008 9:22 pm
by fritzxnview
I did a short test at commandline with nconvert and it worked
for /D %i in (*) do nconvert -multi -out tiff -o "%i.tif" "%i\*.tif"
in a batchfile it should written a bit different
for /D %%i in (*) do nconvert -multi -out tiff -o "%%i.tif" "%%i\*.tif"
Posted: Mon Jun 30, 2008 1:56 pm
by firestar77
Hello fritzxnview,
thanks for the reply.
for /D %i in (*) do nconvert -multi -out tiff -o "%i.tif" "%i\*.tif"
doesn't quite work though: "%i\*.tif" isn't understood by nconvert.
(Error: Can't open file (15017025\Fich0001\*.tif))
When I use the image filename though it works for the images I've given.
eg. for /D %i in (*) do nconvert -multi -out tiff -o "%i.tif" "%i\Image1.tif" "%i\Image2.tif" "%i\Image3.tif" ...
is there a way to enable the wildcards like in your example? I'm using Windows 2000 SP4.
Regards,
firestar
P.S. Thanks for your response Peter, I'm using nconvert now

Posted: Wed Jul 02, 2008 8:44 pm
by fritzxnview
Used nconvert 4.92, March 26 2008
could be, there is another error in nconvert
for /D %i in (*) do nconvert -multi -out tiff -o "%i.tif" %i\*.tif
this line should work at commandline
the quotation mark at last argument now lost
in general they should beware of white spaces, but why they don't work, i don't know
i did a short test with
dir 1
dir 2
dir3
Only dir3 was convertet.
And now the big point.
dir1 --> file 001, file 002 ... (with white spaces)
dir2 ...
dir3 ...
does work.
So the conclusion. At this time you can use it, if the last argument is without quotation marks and the folders are named without white spaces. The filenames can have them.
The same procedure with 4.95 and 4.98beta. Last argument is not proper handled with quotation marks.
Paris, we have a problem.
Posted: Thu Jul 03, 2008 6:38 am
by xnview
firestar77 wrote:Do you have tried
for /D %i in (*) do nconvert -multi -out tiff -o %i.tif %i\*.tif
And yes, if filename or folder have a space, there is a problem
Posted: Thu Jul 03, 2008 4:03 pm
by firestar77
Thanks,
it works smoothly.
Pierre, it would be great if you could also implement the "whitespace" fix if you've got some free time on your hands. Just in case someone needs it (not so uncommon these days - dirs with whitespaces).
Regards,
Ben