Page 1 of 1

input/output filenames and paths

Posted: 2016-02-20T09:08:56-07:00
by samIam
Very new to this and trying to figure out how to handle folders/directories on windows.

If I have this batch file in the same directory as the image, it works great:
montage -label "Bottom SC" *.jpg -geometry +0+0 -pointsize 200 -background Gold 1btmSC.jpg

However, I need to get it to where the batch file can be located in a different folder/directory than the image. But as soon as I add a path to my command line, it doesn't work anymore:

montage -label "Bottom SC" 'C:\TIApic\1btmSC\*.jpg' -geometry +0+0 -pointsize 200 -background Gold 1btmSC.jpg
or
montage -label "Bottom SC" 'C:\TIApic\1btmSC\*.jpg' -geometry +0+0 -pointsize 200 -background Gold 'C:\TIApic\1btmSC\1btmSC.jpg'

I tried " or ' or no quotes at all. Any pointers?
Thanks

Re: input/output filenames and paths

Posted: 2016-02-20T10:20:14-07:00
by glennrp
Read the "Using the DOS Shell and Batch Files" section at http://www.imagemagick.org/Usage/windows/
Maybe the answer is there.

Re: input/output filenames and paths

Posted: 2016-02-20T10:50:24-07:00
by GeeMack
samIam wrote:Very new to this and trying to figure out how to handle folders/directories on windows. [...] Any pointers?
Maybe take a look at the Windows "pushd" command to get your batch file to change directory.

Re: input/output filenames and paths

Posted: 2016-02-20T11:50:46-07:00
by fmw42
What is ???? in your command?

Please, always provide your IM version and platform when asking questions, since syntax may differ.

See viewtopic.php?f=1&t=9620

Re: input/output filenames and paths

Posted: 2016-02-20T13:26:18-07:00
by samIam
I am not sure what happened when I pasted the lines into the post - the ???? were 'g o l d'. Not sure why you cannot say that word here....

But it is working now - double quotes ("), instead of single:
montage -label "Bottom SC" "C:\TIApic\1btmSC\*.jpg" -geometry +0+0 -pointsize 200 -background Gold 1btmSC.jpg

This allows me to essentially 'grab' a file from the 1btmSC folder, label it and place it in the active folder. That's exactly what I was looking for.

Thanks for the help.

Re: input/output filenames and paths

Posted: 2016-02-20T13:48:52-07:00
by fmw42
I am believe that Windows (batch?) needs double quotes. See http://www.imagemagick.org/Usage/windows/