How do I set the default directory?

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
RCinSTP
Posts: 21
Joined: 2014-08-18T07:42:44-07:00
Authentication code: 6789

How do I set the default directory?

Post by RCinSTP »

I am using a command line like this: montage c:\data\one.jpg c:\data\two.jpg c:\data\three.jpg c:\data\four.jpg -mode Concatenate -tile 2x2 c:\data\combined.jpg

I searched the documentation and this forum but I couldn't figure out how to set the default directory for input and/or output so that I would not need to include the file path "c:\data" before each image. Or, this there a way to write this command line so that it works montage/tiles all files in a directory?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How do I set the default directory?

Post by snibgo »

Type the following commands:

Code: Select all

c:
cd \code
snibgo's IM pages: im.snibgo.com
RCinSTP
Posts: 21
Joined: 2014-08-18T07:42:44-07:00
Authentication code: 6789

Re: How do I set the default directory?

Post by RCinSTP »

I don't understand? If I am at the command prompt and it reads: c:\> and I type "cd \code" wouldn't that command try to change the directory to c:\code ?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How do I set the default directory?

Post by snibgo »

Sorry, I had "code" on the brain. I meant:

Code: Select all

c:
cd \data
snibgo's IM pages: im.snibgo.com
RCinSTP
Posts: 21
Joined: 2014-08-18T07:42:44-07:00
Authentication code: 6789

Re: How do I set the default directory?

Post by RCinSTP »

I changed the command prompt so that it now reads: c:\data then I tried running c:\data montage one.jpg two.jpg etc., but the montage command could not find the files, it's not looking in c:\data
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How do I set the default directory?

Post by snibgo »

Exactly what command did you use, and what was the exact error message?
snibgo's IM pages: im.snibgo.com
RCinSTP
Posts: 21
Joined: 2014-08-18T07:42:44-07:00
Authentication code: 6789

Re: How do I set the default directory?

Post by RCinSTP »

I used:
c:\data> montage one.jpg two.jpg three.jpg four.jpg -mode Concatenate -tile 2x2 combinedImage.jpg

Do I use a command similar to below to set the default directory?

C:\Program Files\ImageMagick-6.8.3-Q16\montage.exe -define registry:temporary-path="D:\Temp"
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How do I set the default directory?

Post by snibgo »

"temporary-path" gives the location for temporary files.

For me, montage reads and writes to the current directory. I don't know why it won't for you.

What error message does it give?
snibgo's IM pages: im.snibgo.com
RCinSTP
Posts: 21
Joined: 2014-08-18T07:42:44-07:00
Authentication code: 6789

Re: How do I set the default directory?

Post by RCinSTP »

I apologize, I must have made a small typo or something because now it is working fine. Thank you for your help and support.
Post Reply