I'm interested in downloading a bunch of webpages by running a curl statement in a loop in a batch file.
The webpages end in a number which are in a range, of say from 100 to 200, and I would like to download each page as an html file.
When I run the following, the program freezes / throws and error. How can I get this to work?
Thanks in advance!
@echo off
echo @echo pages will begin downloading... > ListOfPages.txt
SETLOCAL ENABLEDELAYEDEXPANSION
For /L %%A IN (100,1,200) do (  
    SET page="http://path/to/webpage/%%A"
    SET destination="C:\path\to\file\sitenumber_%%A.html"
    :: insert curl statements to new file
    echo curl !page! -OutFile !destination! >> ListOfPages.txt
)
:: Loop through each line of new file and execute curl statement
For /F %%G in (C:\path\to\file\ListOfPages.txt) do (
     WHAT GOES HERE???
 )
 
    