Search : in
By :

Help with Loop in batch File using input from

Last answer on Jun 25, 2009 9:54:25 pm BST PeterPan, on Jul 19, 2008 2:00:36 pm BST 
 Report this message to moderators

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 :)

Configuration: Windows Vista
Internet Explorer 7.0

Best answers for « Help with Loop in batch File using input from » in :
[Batch File]Time based actions Show[Batch File]Time based actions Issue Solution Issue Upon creating a batch file you want that certain line of batch file is executed after every second (not all the program only certain line). In VB we can do it using the Timer...
Batch file ShowBatch file Settings File Creation DOS is integrated in windows which allow to exploit functionality and command sequence in a script. A batch file is a text file which contains command to be read by DOS. This file can be launched...
What is a batch file? ShowWhat is a batch file? Creating a batch file Prerequisites Create file Windows comes with a version of DOS, which allows you,exploiting the features and the sequence of commands in a script. Batch file, is a simple text file (ascii)...

1

PeterPan, on Jul 19, 2008 2:42:15 pm BST
  • +8

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"

Reply to PeterPan

2

D, on Feb 24, 2009 6:11:55 am GMT
  • +7

How creat loop batch file in windows xp

Reply to D

3

dayanand, on Feb 28, 2009 11:23:09 am GMT

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

Reply to dayanand

4

 hacker987, on Jun 25, 2009 9:54:25 pm BST

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?

Reply to hacker987