how to deal with space in folder name?

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
ChristinaChristina
Posts: 7
Joined: 2019-06-16T10:16:33-07:00
Authentication code: 1152

how to deal with space in folder name?

Post by ChristinaChristina »

I am doing a batch change of files, but am now stuck as a couple of the folder names in the path contains a space. I have tried with quotation marks, a slash before the space, etc., but nothing seems to work. Any ideas?

This is the code I am trying to run:

mogrify -strip -colorspace sRGB -format png -alpha set -fuzz 10% -transparent white -fill Red -opaque Black -path C:/Dropbox (Personal)/Scannade dokument/Epson/My messages/Test/Output/ *.jpg
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: how to deal with space in folder name?

Post by snibgo »

Please always state your platform. I assume it is Windows.

Windows directory separators are backslashes "\" not forward slashes "/".

If the directory or filename contain spaces, use double-quotes:

Code: Select all

-path "C:\Dropbox (Personal)\Scannade dokument\Epson\My messages\Test\Output\"
snibgo's IM pages: im.snibgo.com
ChristinaChristina
Posts: 7
Joined: 2019-06-16T10:16:33-07:00
Authentication code: 1152

Re: how to deal with space in folder name?

Post by ChristinaChristina »

Many thanks!
Post Reply