Is there a way to create a batch file that when it looks something up on a website, and find a picture, text or something there, that it takes action to it, like, when it found the pictures the batch should GOTO:Choice1 and when not GOTO:Choice2 ?
Asked
Active
Viewed 58 times
0
-
You can Use `Curl` or `Wget` to download the source of the page and then aplly a `find` against the downloaded XML. – SachaDee Jul 26 '14 at 15:07
-
Can you give me a short code on how to use them? – tanckom Jul 26 '14 at 15:24
1 Answers
0
Here an example :
@echo off
curl URL_of_Your_Web_site>File.xml
findstr /i "the string to search" file.xml && echo string found || echo string not found
If you have to make a LOGIN in the Web site you have to download first the cookie with your ID and Password.

SachaDee
- 9,245
- 3
- 23
- 33
-
Do i have to install curl on all computers that use this batch? Because i just see that you need to install curl to use this command? – tanckom Jul 26 '14 at 17:38
-
curl no need installation it's an `.exe` : http://www.paehl.com/open_source/?download=curl_737_0.zip&PHPSESSID=08556dc20264adcaadf71c1ba53cdb4d – SachaDee Jul 26 '14 at 17:41
-
I tried to do it with my website, but i get an error, that curl is a command that does not exist – tanckom Jul 26 '14 at 17:54
-
-
Okay, but does all pc, that run this batch, need to have curl installed? – tanckom Jul 26 '14 at 18:07
-
-
Yes, @tanckom that's the only way. Or you can integrate curl in HEXA in your bat and reconstruct it when you're bat is executed. – SachaDee Jul 26 '14 at 19:51