version: ImageMagick-6.7.5-7-Q16-windows-dll.exe
Can anyone help me out with this DOS script
---
@echo off
for %%a in ("*.png") do call convert %%a -transparent none -resize 50% PNG32:%%a
---
I get error: @error/covert.c/ConvertImageCommand/2353
because the 50% resize argument has a "%" in it.
Is there a way to get around this?
DOS Script with Wildcards (% error) help.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: DOS Script with Wildcards (% error) help.
You have to double the percent - 50%%
Pete
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.
Re: DOS Script with Wildcards (% error) help.
Hi Pete,
Somehow DOS changes the argument when adding the double %% for the percent argument for convert command and just fails?
Somehow DOS changes the argument when adding the double %% for the percent argument for convert command and just fails?
Code: Select all
@echo off
for %%a in ("*.png") do call convert %%a -transparent none -resize 50%% PNG32:%%a
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: DOS Script with Wildcards (% error) help.
It would appear that it is the "call' that is causing the problem although I don't know why. Try this:
Pete
Code: Select all
for %%a in ("*.png") do convert %%a -transparent none -resize 50%% PNG32:%%a
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.
Re: DOS Script with Wildcards (% error) help.
Removing the word "call" worked! Thanks Pete!