Spaces in filenames and paths

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
phil

Spaces in filenames and paths

Post by phil »

hello,

convert doesn't accept filenames/paths with spaces, even when quoted.

Windows Vista.
regards.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Spaces in filenames and paths

Post by fmw42 »

phil wrote:hello,

convert doesn't accept filenames/paths with spaces, even when quoted.

Windows Vista.
regards.
I am not a Windows user, but did you try both single and double quotes?
phil

Re: Spaces in filenames and paths

Post by phil »

hi,

I've got it working now...or a least in part...I'll explain...

this is the command I was using in a dos command window

convert %png% -resize 50% %gif%

where variables png and gif contain path and filenames of a png and gif file respectively.

When I ran this command a got an error...

convert: option requires an argument '-resize' @ convert.c/ConvertImageCommand/2143

Being the first time that I've used ImageMagick, and having taken the command format from an example on this site, I thought the problem may have been caused by spaces that are present in the path/filenames. But after quoting with double and single quotes that gave me errors that the file doesn't exist caused by spaces, I discovered the path/filenames in the variables were already quoted ! - so I was causing additional problems by quoting them.

So the problem is another one - it doesn't recognise the 50% argument for the -resize option, which is of course exactly what the error message states :roll:

Which also means that this is no longer a bug report :oops: , but a cry for assistance. :?

regards.
phil

Re: Spaces in filenames and paths

Post by phil »

Update...

a search through the docs here and I found out that windows dos command scripts have a problem with the '%' character...to resolve...add another one. ie. '%%' ...and that solved the problem. :D

regards.
Post Reply