Is the syntax correct for the batch file?

January 3, 2011 at 11:52:49
Specs: Windows XP
for /F "delims=;" %%template in (templates.txt) do java -jar checkbox-cleanup.jar -p=/config/klink.yml -a=data -c="TEST" -t="%%template"

templates.txt has several line entries each delimited by a semi-colon.

I want to call the java app in my batch file for each entry in the templates.txt file but it doesn't seem to be working. When I attempt to run the batch file, I receive the following message:

%template was unexpected at this time

However, the java app does run outside of the For command. My goal is to eliminate the need to run this java app mulitple times for each template. Any feedback would be greatly appreciated.

See More: Is the syntax correct for the batch file?

Report •

January 3, 2011 at 12:23:26
Got it working.

Report •

January 3, 2011 at 12:43:05
@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in (templates.txt ) do (
for %%i in (%%a) do (
echo jave bla bla %%i

Life is too important to be taken seriously.


Report •
Related Solutions

Ask Question