Computing.Net > Forums > Programming > Help with batch file!

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Help with batch file!

Reply to Message Icon

Name: GRAYgoose13
Date: April 11, 2009 at 15:23:10 Pacific
OS: Windows Vista
Product: Me / Supadupacomputa
Subcategory: Batch
Comment:


call n.bat

call n.bat

IF exist http://explosm.net/comics/%n%/ goto exist
IF not exist http://explosm.net/comics/%n%/ goto notexist

:exist
open firefox.exe http://explosm.net/comics/%n%/
set n=%n% + 1
exit

:notexist
echo set n=%n% > n.bat
exit

How can I make the two 'IF' lines work? the n.bat is:


set n=1620


If you see anything besides those if lines wrong, please tell me.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: April 11, 2009 at 16:46:10 Pacific
Reply:

I don't think you can do if exist for a web page.


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: Judago
Date: April 11, 2009 at 18:23:36 Pacific
Reply:

http://users.ugent.be/~bpuype/wget/


call n.bat

call n.bat

2>&1 wget http://explosm.net/comics/%n%/ -t 2 --spider -T 5 -U "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; )"|>nul FIND /I "giving up."&&goto notexist

:exist
start firefox.exe http://explosm.net/comics/%n%/
set n=%n% + 1
exit

:notexist
echo set n=%n% > n.bat
exit


0

Response Number 3
Name: GRAYgoose13
Date: April 11, 2009 at 18:51:47 Pacific
Reply:

Thanks Judago, I need to start getting more of these types of programs.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Help with batch file!

Need help with batch file www.computing.net/answers/programming/need-help-with-batch-file/9707.html

Help with batch file (FOR /R) www.computing.net/answers/programming/help-with-batch-file-for-r-/14521.html

Help with Batch files www.computing.net/answers/programming/help-with-batch-files/12927.html