Hi again. Any thoughts on this one:
Is there a way to run multiple commands inside one Exec Task? For example
see below. I create an ItemGroup to hold multiple Server names. This is
used in the Exec Command. The EXEC Command executes the number of Servers
(or Items I have). I also need to call a .bat file inside the loop. So the
EXEC Command needs to do the "DoSomeProcess" and then call the .bat file
(inside the loop). In the example below I would need only 2 iterations
(since there are only 2 servers in the ItemGroup).
1st Iteration: \\ABC "DoSomeProcess" and then \\ABC "c:\example.bat"
2nd Iteration: \\DEF "DoSomeProcess" and then \\DEF "c:\example.bat"
<ItemGroup>
<Servers include="item">
<Server>ABC</Server>
</Servers>
<Servers include="item">
<Server>DEF</Server>
</Servers>
</ItemGroup>
<Target Name="target1" Outputs="%("Servers.Identity")>
<CreateProperty Value="%(Servers.Server)">
<Output TaskParameter="Value" PropertyName="ServerName">
</CreateProperty>
<Exec Command="PSEXEC \\$(ServerName) "DoSomeProcess" Command="PSEXEC
\\$(ServerName) "c:\example.bat"/>
</Target>
The Exec Command I show above will not work. I cannot have 2 Commands
inside the Exec Task. How can I accomplish this? Any thoughts or
suggestions are very much appreciated.
Thanks,
Oscar Bautista
_______________________________________________
oztfs mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/oztfs