Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Macro name changed from html to html-bobswift during server to cloud migration processing.

...

Keep in mind that both the batch file and the file created by the redirected output reside on the remote system.

Panel
Html bobswift
<pre>
1 

set

Html bobswift
 echo=no
2 

set

Html bobswift
 outdir=C:\tmp\joe
3 

open

Html bobswift
 r=dallas user=joe pwd=abcdefg
4 

exec

Html bobswift
 r cmd="C:\wrk\xmp\win\winxmp.bat $(outdir)\stdout.txt" user=joe pwd=abcdefg
5 

cd

Html bobswift
 r=$(outdir)
6 

cd

Html bobswift
 local=C:\tmp\tmp
7 

attrib

Html bobswift
 local createop=replace
8 

copy

Html bobswift
 r=stdout.txt
9 

exec

Html bobswift
 local cmd="type C:\tmp\tmp\stdout.txt" user=joe pwd=abcdefg
10 

quit

Html bobswift
 
</pre>

Due to the complexity of this example, each line (numbered for your convenience) is explained, below.

...


Anchor
1091290
1091290
The winxmp.bat batch file now echoes the received parameter. This puts output into the transaction log so that you can see what was passed to the remote system. The second line performs the dir command and redirects output to stdout.txt.

Panel
Html bobswift
<pre>

echo

Html bobswift
 %1

dir

Html bobswift
 "C:\wrk\xmp\win" > %1
</pre>


Anchor
1091295
1091295
Output sent to stdout.txt.

Panel
Html bobswift
<pre>
C:\Program Files\Universal\UCmdHome\joe>dir "C:\wrk\xmp\win"
 Volume in drive C has no label.
 Volume Serial Number is 3030-176B

 Directory of C:\wrk\xmp\win

07/27/2011  03:27 PM    &lt;DIR&gt;          .
07/27/2011  03:27 PM    &lt;DIR&gt;          ..
07/27/2011  10:08 AM                20 winxmp.bat
07/27/2011  03:46 PM               106 winxmpbat.udm
               2 File(s)            126 bytes
               2 Dir(s)  13,453,979,648 bytes free
</pre>

UDM exec Command Parameters

...