Help with Loop in batch File using input from [Solved/Closed]

- - Latest reply: hacker987
Posts
7
Registration date
Wednesday June 24, 2009
Last seen
June 25, 2009
- Jun 25, 2009 at 04:54 PM
Hi Together

I try to scan some PCs remotely and do want to automize this task.

I created a batch file doing a good job, however, it scans only one pc and then I do need to change the target system name.
I now want to create a comma seperated list, stored in a txt that is the reference for the batch to know what PCs to scan and got lost...

Can someone please assist me in getting the following done?

In "Cleer Type" it should like:

:Systemscan
IF "c:\myscan\clients.txt" is empty goto :end
ELSE
For Each Item listed in "c:\myscan\clients.txt" DO
command1.exe CSV /FO >> C:\myscan\logs\log1.txt
command2.exe CSV /FO >> C:\myscan\logs\log2.txt
END IF


Sorry, I know I am a lousy coder, but hopefully someone can make my life a bit easier?
Any help is much appreciated.

All the best from PeterPan :)
See more 

4 replies

Best answer
13
Thank you
Ok guys, after doing some more reasearch due to frustration I found it myself...

For /F "delims=;" %%A in (c:\myscan\clients.txt) do systeminfo.exe /S %%A /FO csv /NH >> C:\myscan\systeminfo.txt"

Say "Thank you" 13

A few words of thanks would be greatly appreciated. Add comment

CCM 4335 users have said thank you to us this month

11
Thank you
how creat loop batch file in windows xp
0
Thank you
Hi

I want formula, I have many excel file near about 50 file I want convert one file which is csv or html or text file

Plz tell me
Posts
7
Registration date
Wednesday June 24, 2009
Last seen
June 25, 2009
-1
Thank you
just wondering if any1 here knows how to make a batch file send txt from itself to a txt file cuz I want to make a virusmaker but dont know wich line of code I need to use like ok heres a example of wut I want it to do.
@echo off
Title Virus-Maker
color 09
echo Main menu
echo.
echo 1.Delete keyboard router
set /p number=ENTER NUMBER OF YOUR CHOICE :
now how do I make this batch file send the code needed to delete the keyboard router and the code is
del C:\Terminal Server Keyboard Driver
how do I make it send this code to a txt file on the desktop?