Result filename pattern, based on existing files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
CrazyDiamond
Posts: 1
Joined: 2020-01-20T03:52:24-07:00
Authentication code: 1152

Result filename pattern, based on existing files

Post by CrazyDiamond »

Hi

Im doint basing convert from PDF to JPG using command like this
convert -density 250 -quality 60 '\\tra.ta.ta\file.pdf' C:\temp\PDFtoJPG\%02d.jpg
Result file is 00.jpg

The question is: if there is already 00.jpg exists from previous conversion, how to make 01.jpg, instead of overwriting 00.jpg?
Is it possible with ImageMagik, or should i script it (define new filename from script)?

snibgo
Posts: 12904
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Result filename pattern, based on existing files

Post by snibgo »

IM won't check to see if the file already exists. You should do that in a script.
snibgo's IM pages: im.snibgo.com

Post Reply