Help with batch file!

Me / Supadupacomputa
April 11, 2009 at 15:23:10
Specs: Windows Vista

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.


See More: Help with batch file!

Report •


#1
April 11, 2009 at 16:46:10
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


Report •

#2
April 11, 2009 at 18:23:36
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


Report •

#3
April 11, 2009 at 18:51:47
Thanks Judago, I need to start getting more of these types of programs.

Report •

Related Solutions


Ask Question