Batch file run from task schedule

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
yoni@catom.com
Posts: 3
Joined: 2015-05-20T23:30:26-07:00
Authentication code: 6789

Batch file run from task schedule

Post by yoni@catom.com »

I have this batch file:

Code: Select all

@echo off
--trust-model always
for %%f in (C:\inetpub\folder\images\*) do (
echo %%f
convert %%f -resize 200 C:\inetpub\wwwroot\folder\gallery\%%~nf_big%%~xf
convert %%f -resize 100 C:\inetpub\wwwroot\folder\gallery\%%~nf_small%%~xf
move %%f C:\inetpub\wwwroot\folder\gallery\
)
if i run the batch from command line the move works and the convert as well

if i run it from the schedule task (as administrator) only the move works but not the 2 convert line

what can be done?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Batch file run from task schedule

Post by dlemstra »

It is probably finding the convert executable of Windows. You might want to specify the full path to convert of ImageMagick.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
yoni@catom.com
Posts: 3
Joined: 2015-05-20T23:30:26-07:00
Authentication code: 6789

Re: Batch file run from task schedule

Post by yoni@catom.com »

Thanks!
Post Reply