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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using exec in the Window environment

Status
Not open for further replies.

rajprakash

Programmer
Dec 11, 2002
1
0
0
US
I am a new user of the tcl :). I am currently planning to use exec to create a subprocess like a worker to process the background work.
I am having problem with exec getting to work. Here is my question:
exec tcl-command
Would this work? In other words, let us say that I use date /T as example. THis did not work just the way I have it.
Also if I want to exec another tcl program that I created, how do I exec it?

Pleas help.....
 
As far as i know (by using this call from Cobol), you can't execute internal DOS commands, just external .COM .EXE and .BAT (only in WinXP) files.
To execute internal DOS commands you must use the Comspec system variable and call the "DOS commander" (command.com, cmd.exe etc) with the /C switch.
Also don't forget to nul-terminate the command string you pass to the EXEC call, as Windows workes like C...
Hope i helped a little.
Merry Christmas! the_mOuSe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top