Trying to get a batch file to run on computer

Microsoft Windows xp professional editio...
November 4, 2009 at 13:19:05
Specs: Windows XP
What I am trying to get done is to run a MS update on several workstations on a Domain. Now this is my first batch file thats this complex.
Now I create a another file called serverot.txt with computer mappings like this
\\computername
\\computername

When run the batch file a get this error message
delims was unexpected at this time.

C:\Remote installs>for /f usebackq delims == "%I in ("serverot.txt) do Call :beg
in %I

The file I am trying to create is below.

@echo off
for /f usebackq delims == "%%I in ("serverot.txt) do Call :begin %%I
goto :EOF


:begin
set srv=%1
:get info
robocopy \\servername\remote installs\test \\%srv%\c$\temp\ /xf MTenav_*.* /r:0 /w:0
psexec \\%srv% -w "cmd.exe /c c:\temp\install_enav\test /silent

Thanks for your help
Tommyboy78


See More: Trying to get a batch file to run on computer

Report •


#1
November 4, 2009 at 21:35:56
Post this in the Programming Forum

Home Page http://ewen.uuuq.com/


Report •

#2
November 4, 2009 at 22:51:41
Simple the delimiter is not I (eye) it is 1 (One) I think this is where the solution maybe. It is easy to over see this.

C:\Remote installs>for /f usebackq delims == "%1 in ("serverot.txt) do Call :beg
in %1

The file I am trying to create is below.

@echo off
for /f usebackq delims == "%%1 in ("serverot.txt) do Call :begin %%1


Report •

#3
November 5, 2009 at 00:16:18
look at for/?


=====================================
Helping others achieve escape felicity

M2


Report •

Related Solutions


Ask Question