Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use the exec command correctly

Status
Not open for further replies.

programmer28

Programmer
Joined
Jan 24, 2004
Messages
1
Location
US
Hello,

I would like to run this dos command from TCL: "udplisten 7777 > test.txt" which is sitting in this local address c:/Program files/myProgram/udplisten.exe.

The problem is that when I am using the exec command I receive an error "No such file or directory"How do I do that correctly???
 
Try using 'file nativename'.
Code:
if {[file exists [file nativename $str]]} {
    exec [file nativename $str]
}

Don't know what your udp listener does, but tcl
has an easy to use UDP add-on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top