Using "exec" under Windows 95/NT 
Author Message
 Using "exec" under Windows 95/NT

Hi,

I recently installed Tcl 7.5 and Tk 4.1 for Windows 95/NT. Everything
works great except for the "exec" command. The typical error is:

   couldn't execute "xxx": no such file or directory

For example, if I say

   tcl> exec "rename file1 file2"
   couldn't execute "rename file1 file2": no such file or directory

Or

   tcl> exec dir
   couldn't execute "dir": no such file or directory

Any ideas as to what is going on? Thanks in advance...
Milind.



Sat, 02 Jan 1999 03:00:00 GMT  
 Using "exec" under Windows 95/NT


Quote:
> I recently installed Tcl 7.5 and Tk 4.1 for Windows 95/NT. Everything
> works great except for the "exec" command. The typical error is:
>    couldn't execute "xxx": no such file or directory
> For example, if I say
>    tcl> exec "rename file1 file2"
>    couldn't execute "rename file1 file2": no such file or directory
> Or
>    tcl> exec dir
>    couldn't execute "dir": no such file or directory

Both "rename" and "dir" are no programs (they are nowhere on your disk).
These commands are internally executed by the command interpreter (COMMAND
or CMD). You should either try "exec {cmd dir ...}" (maybe cmd needs a
parameter to let it know to exec the parameters) or use the file command
of Tcl itself.

--
Jeroen Hoppenbrouwers, Senior Researcher at     |  Stop connecting computers;
Infolab, Tilburg University, The Netherlands    |  start connecting people!
             http://infolabwww.kub.nl:2080/infolab/people/hoppie



Mon, 04 Jan 1999 03:00:00 GMT  
 Using "exec" under Windows 95/NT

Quote:

> Hi,

> I recently installed Tcl 7.5 and Tk 4.1 for Windows 95/NT. Everything
> works great except for the "exec" command. The typical error is:

>    couldn't execute "xxx": no such file or directory

> For example, if I say

>    tcl> exec "rename file1 file2"
>    couldn't execute "rename file1 file2": no such file or directory

> Or

>    tcl> exec dir
>    couldn't execute "dir": no such file or directory

> Any ideas as to what is going on? Thanks in advance...
> Milind.

...this is a recurring thread and is covered in the Tcl Windows FAQ

"dir" is not a separate program that can be executed, but an internal
command of cmd.exe (NT) / command.com (95/3.1).  From Tcl running under
NT, issue:  "exec cmd.exe /c dir", from 3.1 issue: "exec command.exe /c
dir".  Under 95, don't even try it as it is broken and will hang Tcl.



Mon, 04 Jan 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Q: "exec" in Windows 95

2. "Assembly in VB - in windows 95 ?"

3. "Out Port.vi": passing from Windows NT 4.0 to Windows 2000

4. Bug with "exec" command on NT

5. Trouble with "exec sed" on NT.

6. Error while using "exec"

7. Windows wish42 and "exec"

8. Non-blocking Windows "exec"

9. using exec in windows nt exec on tcl scripts

10. Windows NT "AT" command

11. "Not a Windows NT program"?

12. "menu to" under windows NT

 

 
Powered by phpBB® Forum Software