.bat wont run
Posted: 2011-04-19T17:41:36-07:00
I am a huge coding novice and I was hoping someone might be able to tell me why my batch code will not run.
I am trying to pass many .jpg's into the run.bat and have the run.bat check the .jpg's name and path against a text file containing the names of .jpg's that have already been processed.
I am guessing it might have something to do with scope but to be honest I have no idea. (The resize.bat works by itself btw).
(run.bat)
(resize.bat)
I am trying to pass many .jpg's into the run.bat and have the run.bat check the .jpg's name and path against a text file containing the names of .jpg's that have already been processed.
I am guessing it might have something to do with scope but to be honest I have no idea. (The resize.bat works by itself btw).
(run.bat)
Code: Select all
SETLOCAL EnableDelayedExpansion
%%~d1
CD %%~p1
SET EXISTS=0
FOR %%A in (%%*) DO (
FOR /F %%I in (piclist.txt) DO (
IF %%A=%%I (
SET EXISTS=1
)
)
IF EXISTS=1 (
SET EXISTS=0
) ELSE (
CALL resize.bat "%%A"
ECHO %%A>>piclist.txt
)
)
Code: Select all
convert -size 744x388 xc:#e5e5e5 composite_744x388.png
convert %1 -thumbnail 724x328 large_tmp.jpg
convert large_tmp.jpg ^( +clone -background black -shadow 50x3+5+5 ^) +swap ^
-background none -layers merge +repage shadow_tmp.png
composite -gravity center shadow_tmp.png composite_744x388.png "%~n1_large.jpg
DEL large_tmp.jpg
DEL shadow_tmp.png
DEL composite_744x388.png