I am having a problem with spaces in file names. I have researched the forums and cannot solve it. I see that the reference to the file names has to be in quotes, but with the snippet of script that I found in the FAQ's, I cannot seem to get it to work.
I am using Windows XP Professional and am using this command line script.
FOR %%a in (*.jpg) DO convert %%a -resize 600x400 -quality 85 c:\test\M\%%a
I have tried putting the double quotes around the *.jpg but it will not work.
All we are trying to do is batch process many files in a single directory and put the reduced files in another directory.
Any input would be appreciated.
Space in file name
Re: Space in file name
There may be something that will help you out near the bottom of this page:
http://www.rubblewebs.co.uk/imagemagick/batch.php
Or something on this page:
http://www.imagemagick.org/Usage/windows/
http://www.rubblewebs.co.uk/imagemagick/batch.php
Or something on this page:
http://www.imagemagick.org/Usage/windows/
Re: Space in file name
Bonzo wrote:There may be something that will help you out near the bottom of this page:
http://www.rubblewebs.co.uk/imagemagick/batch.php
Or something on this page:
http://www.imagemagick.org/Usage/windows/
I have reviewed these but see no handling of the spaces in the filenames.
Perhaps I am missing something obvious.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: Space in file name
See: http://www.computerhope.com/forhlp.htm
Near the middle of the webpage it explains how to quote filenames which might contain spaces.
Pete
Near the middle of the webpage it explains how to quote filenames which might contain spaces.
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
See my message in this topic for a link to a zip of all the files.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Space in file name
It is present in the IM example pages...codyhost wrote:I have reviewed these but see no handling of the spaces in the filenames.Bonzo wrote:Or something on this page:
http://www.imagemagick.org/Usage/windows/
Perhaps I am missing something obvious.
These modifiers can be combined, such that "%~dpn1" means "drive + path + name without extension and bracketing quotes". Consequently, we have to bracket the name by double quotes, such that the code also works for filenames including spaces. (If it doesn't, the quotes do no harm.)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/