Page 1 of 1

Please help to create batch file

Posted: 13 Oct 2010 04:31
by krsuresbab
Hi Friends, I need one help i need to create batch file.

To test list of URL's are active or not.

is that URL's working fine or not.

can please help anybody.

Re: Please help to create batch file

Posted: 15 Sep 2011 02:22
by shiva
Hi,
the batch script to check the URL status is as follows,
it will display if URL was working,
for sample i have listed two examples with working and not working,(need to be tested when internet connection was active)

testURL.bat:

@echo off

set server=www.j2meforums.com/var/www/j2me.org/forum/Source

ping %server% > NUL
if %ERRORLEVEL%==0 (
@echo URL working fine
) else (
@echo URL Not working fine
)

set server=www.google.co.in
ping %server% > NUL
if %ERRORLEVEL%==0 (
@echo URL working fine
) else (
@echo URL Not working fine
)
@echo on


thank you,
shiva shankar