loops - bat file to read one line at a time and execute a command and then move to next line -


im writing bat file , need read txt file 1 line @ time , execute command each time , move next line , execute same command again. have text file 30 ip addresses in it, want bat read first one, execute command on it, write output seperate txt file , move line 2, execute command , write output txt file, line 3 , forth, me this? dont mind if want me use vbscript please explain dont understand vbscript :(

please i'm desperate i'm intergrating tool in order run audit i'm doing , need help

you don't need vbscript such simple task, if ip.txt file ip-adresses in in .bat or .cmd put

echo off ::to write result separate files /f %%a in (ip.txt) ping -n 1 %%a>%%a.txt  ::to write result 1 file /f %%a in (ip.txt) ping -n 1 %%a>>output.txt 

replace %% % if give commands @ console


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -