Page 1 of 1

Spaces in filenames and paths

Posted: 2009-03-13T12:52:17-07:00
by phil
hello,

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

Windows Vista.
regards.

Re: Spaces in filenames and paths

Posted: 2009-03-13T14:54:17-07:00
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?

Re: Spaces in filenames and paths

Posted: 2009-03-13T15:40:22-07:00
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.

Re: Spaces in filenames and paths

Posted: 2009-03-13T18:33:47-07:00
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.