SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Piping in JAL runandwait

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Piping in JAL runandwait
Author Message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Piping in JAL runandwait Reply with quote
Hi

I can't seem to get piping command line output to a file working via runandwait in JAL windows edition 3.6.9?
This code does not produce a file

dim pid, number
RunAndWait( "ping localhost >> c:\\temp\\test.txt", "", 300, pid )

Trace shows
JAL 2: Executing RUNANDWAIT("ping localhost >> c:\temp\test.txt", "", "300", "
0")
Bad parameter >>.
JAL Return "2128"

Why can't I use a pipe?

Cheers
Lee
Wed Sep 22, 2010 11:22 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7951

Post Reply with quote
Output redirection is a function of command shell. Without the shell > and >> are interpreted by the system as command line parameters not as redirection symbols. To make that work, please use cmd /C as in the following example:

Code:
dim pid, number
RunAndWait( "cmd /C ping localhost >> c:\\temp\\test.txt", "", 300, pid )

Wed Sep 22, 2010 11:34 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7951

Post Reply with quote
By the way, built-in JAL statements Ping( ) and PingPort() can be used for the same purpose
Wed Sep 22, 2010 11:36 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.