Quantcast
Channel: CodeProject Latest postings for ASP.NET
Viewing all articles
Browse latest Browse all 3938

BAT FILE NOT GIVING PROPER RETURN VALUE in TXT file

$
0
0
Hi All,
 
I am using below bat file which should return output text as URLs which are NOT browsable(eg. page not found error) but it is actually returning all successful ping in output text.Please help me to modify my bat file:-
 
@ECHO OFF
 
SET output=FaultyURLs.txt
 
IF EXIST "%output%" DEL "%output%"
 
FOR /f %%a IN (URLs.txt) DO (
 
CALL :ping %%a
 

 
)
 
GOTO :EOF
 

 
:ping
 
ping -n 1 %1 | find "Approximate round trip" >NUL || ECHO %1>>"%output%"
ECHO URLs SCANNING COMPLETED
ECHO
PAUSE>NUL

Viewing all articles
Browse latest Browse all 3938

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>