Page 1 of 1

Batch file run from task schedule

Posted: 2015-11-19T00:52:33-07:00
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?

Re: Batch file run from task schedule

Posted: 2015-11-19T00:55:40-07:00
by dlemstra
It is probably finding the convert executable of Windows. You might want to specify the full path to convert of ImageMagick.

Re: Batch file run from task schedule

Posted: 2015-11-19T01:51:05-07:00
by yoni@catom.com
Thanks!