Computing.Net > Forums > Windows XP > Trying to get a batch file to run on computer

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Trying to get a batch file to run on computer

Reply to Message Icon

Name: Tommyboy78
Date: November 4, 2009 at 13:19:05 Pacific
OS: Windows XP
Product: Microsoft Windows xp professional edition
Subcategory: General
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Ewen
Date: November 4, 2009 at 21:35:56 Pacific
Reply:

Post this in the Programming Forum

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


0

Response Number 2
Name: tommya300
Date: November 4, 2009 at 22:51:41 Pacific
Reply:

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


0

Response Number 3
Name: Mechanix2Go
Date: November 5, 2009 at 00:16:18 Pacific
Reply:

look at for/?


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

M2


0
Reply to Message Icon

Related Posts

See More


Ethernet softwarec connec... white line across the bot...


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Trying to get a batch file to run on computer

Batch file to calculate day of week www.computing.net/answers/windows-xp/batch-file-to-calculate-day-of-week/152202.html

Need help creating a batch file www.computing.net/answers/windows-xp/need-help-creating-a-batch-file/172372.html

URGENT: I need a batch file to ping www.computing.net/answers/windows-xp/urgent-i-need-a-batch-file-to-ping/146816.html