G
Guest
1) I have a command I'm trying to run (test before putting it in a batch
file) which I basically want to run the same command but with different names
that are contained in a text file with single line entry's. The file I have
(Textfile.txt) contains:
computer1
computer2
computer3
computer4
2) The command I'm trying to run is:
FOR /F "tokens=1" %G IN (C:\Textfile.txt) DO echo %g
3) The output I'm getting is:
C:\>echo %g%g
C:\>echo %g%g
C:\>echo %g%g
C:\>echo %g%g
Eventually I'll be changing the echo command to something else, but what am
I doing wrong that the echo command is only putting out what I told it yet
it's cycling through the number of records in the file correctly?
file) which I basically want to run the same command but with different names
that are contained in a text file with single line entry's. The file I have
(Textfile.txt) contains:
computer1
computer2
computer3
computer4
2) The command I'm trying to run is:
FOR /F "tokens=1" %G IN (C:\Textfile.txt) DO echo %g
3) The output I'm getting is:
C:\>echo %g%g
C:\>echo %g%g
C:\>echo %g%g
C:\>echo %g%g
Eventually I'll be changing the echo command to something else, but what am
I doing wrong that the echo command is only putting out what I told it yet
it's cycling through the number of records in the file correctly?