Hi All,
I am new to the batch programming,i have three urls.like below.
www.example1.com
www.example2.com
www.example3.com
when i run the batch file it should check the url is valid or not without opening the browser and produce the report in command prompt as valid or invalid
www.example1.com valid ---->if url exists it should display as valid
www.example2.com invalid--->if url not exists it should display as invalid
www.example3.com valid---->if url exists it should display as valid
kindly help me to get the solution..
Thanks
How to check the valid url and make a report for that url.
Moderator: DosItHelp
Re: How to check the valid url and make a report for that url.
Is it possible using the dos batch programming.can any one provide the simple code to help me pls..when you get time do the favour for me.
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: How to check the valid url and make a report for that url.
Code: Select all
<nul set /p "=www.example1.com..."
(ping www.example1.com >nul&&echo Valid)||echo Invalid
And then repeat for the other URLs you want to check.