Search found 7 matches

by sTi
2014-10-21T12:21:49-07:00
Forum: Users
Topic: Batch script help (Windows)
Replies: 13
Views: 13714

Re: Batch script help (Windows)

Putting quotes in the IM command will ensure it works when the filename contains spaces. The problem will be the drag-and-drop of filenames with spaces. Windows probably quotes these. So you probably need "%~1" instead of "%1". It still closes the DOS window immediately. I searched around a bit ...
by sTi
2014-10-21T06:10:36-07:00
Forum: Users
Topic: Batch script help (Windows)
Replies: 13
Views: 13714

Re: Batch script help (Windows)

snibgo wrote:"\small" must exist at the root, not as a sub-directory. That's what the first "\" means.
Thanks, I didn't know that. It works now, but only for files without spaces in the filename - I thought the "" are meant to ensure that it works with all names?
by sTi
2014-10-21T05:50:39-07:00
Forum: Users
Topic: Batch script help (Windows)
Replies: 13
Views: 13714

Re: Batch script help (Windows)

snibgo wrote:That's the message you'll get if the directory \small doesn't exist. Does it? Can you write to it?
Yes, it does exist (in the same folder where the file to be processed is located) and is not write-protected.
by sTi
2014-10-21T05:11:50-07:00
Forum: Users
Topic: Batch script help (Windows)
Replies: 13
Views: 13714

Re: Batch script help (Windows)

snibgo wrote:It needs a tilde "~" thus: convert "%1" -resize 50%% "\small\%~nx1"
I'm afraid it still doesn't work:
Image
by sTi
2014-10-20T11:32:44-07:00
Forum: Users
Topic: Batch script help (Windows)
Replies: 13
Views: 13714

Re: Batch script help (Windows)

How did I put a "DO" in there? I don't know. It is wrong. Remove it. Sorry. Hmm, it still gives an error: http://i.imgur.com/mlPrqSi.png What is more, it still seems to reject file names with spaces (it closes the DOS box immediately), although the script contains the quotation marks ("%1" and ...
by sTi
2014-10-20T08:03:29-07:00
Forum: Users
Topic: Batch script help (Windows)
Replies: 13
Views: 13714

Re: Batch script help (Windows)

A drag-and-drop script might look like this: :loop if "%1"=="" ( echo Finished pause exit ) DO convert "%1" -resize 50%% "\small\%nx1" shift pause goto loop When it does what you want, you can remove each "echo" and "pause". Thanks, the first example that converts all files in a folder works fine ...
by sTi
2014-10-18T13:29:38-07:00
Forum: Users
Topic: Batch script help (Windows)
Replies: 13
Views: 13714

Batch script help (Windows)

Hi, I'm a new user with very little command line and batch script experience, so please excuse my ignorance... but I'm really trying to learn from the IM usage guides. In the Windows usage guide (http://www.imagemagick.org/Usage/windows/), the following example is given for Batch Processing Several ...