Please help to create batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
krsuresbab
Posts: 6
Joined: 13 Oct 2010 02:18

Please help to create batch file

#1 Post by krsuresbab » 13 Oct 2010 04:31

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.

shiva
Posts: 18
Joined: 11 Jul 2011 03:53

Re: Please help to create batch file

#2 Post by shiva » 15 Sep 2011 02:22

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

Post Reply