I need to take input of a list of links that go to pages of similar format, with the difference of content and one tag.
EDIT
input.txt
/category/apples-and-oranges.html
/category/pineapples.html
/category/asparagus.html
/category/brussel-sprouts.html
/category/passion-fruit.html
Assume that the pages involving fruit have <h1>Fruit!</h1>
while the non-fruit pages don't, but they're under one category. The program would check those extensions to http://www.mysite.com
and then create a new list:
output.txt
/category/apples-and-oranges.html
/category/pineapples.html
/category/passion-fruit.html
Here's what I've got so far:
for /f %%A in (input.txt) DO (
for "tokens=1,2 delims=:" %%b in ('FINDSTR [/R] [/I] [/S] [/C:"<H1>.*Fruit!.*</H1>"] [[http://]www.mysite.com/%%A[*.html]]') DO (
echo ^<%%A> > <output.txt>
)
)
.*
" *.htm') do ECHO ^%%b^` – PA. Oct 20 '11 at 15:44