Hello,
Sorry for writing my post here but I couldn't find a forum for batch files.
I'm trying to have my batch file execute a command within my loop but cannot get to do it.
The code will display all countries in my txt file but only run the command for the last country.
How can I make the command run for all countries?
Any advice much appreciated.
Sorry for writing my post here but I couldn't find a forum for batch files.
I'm trying to have my batch file execute a command within my loop but cannot get to do it.
The code will display all countries in my txt file but only run the command for the last country.
How can I make the command run for all countries?
Any advice much appreciated.
Code:
REM Loop for countries
for /f %%a in (countries.txt) do (
echo %%a
set country=%%a
"c:\Program Files (x86)\PDF\PDFMerge\Pdfmerge" Daily_POs_countries.xml c:\Scheduled_Reports\Countries\%country%\Daily_PO_Reports_%country%.pdf
)