Help with Loop in batch File using input from

Solved/Closed
PeterPan - Jul 19, 2008 at 09:00 AM
hacker987 Posts 7 Registration date Wednesday June 24, 2009 Status Member 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 :)
Related:

4 responses

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"
14
how creat loop batch file in windows xp
11
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
0
hacker987 Posts 7 Registration date Wednesday June 24, 2009 Status Member Last seen June 25, 2009
Jun 25, 2009 at 04:54 PM
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?
-1