Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-19
04:12 • Ticket [218301ffff] dir command works on tcl command line but not in a script</i... artifact: 508709285b user: dgp
2000-10-26
08:18 • Closed ticket [218301ffff]. artifact: 30ef534c1e user: welch
00:55 • New ticket [218301ffff]. artifact: 19ef074c33 user: nobody

dir command works on tcl command line but not in a script

Closed / Fixed218301ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:55:54
OriginalBugID: 3651 Bug
Version: 8.2.1
SubmitDate: '1999-11-23'
LastModified: '1999-11-29'
Severity: LOW
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Windows 95
FixedDate: '2000-10-25'
ClosedDate: '1999-11-29'


Name: paul battersby

ReproducibleScript:
If I type dir on the tcl command line, it provides me with the output of the DOS dir command. If I put this same line in a script and source it instead, I get an error that says   invalid command name "dir"

ObservedBehavior:
dir command did not work from within a script

DesiredBehavior:
anything that works from the command line should work in a script



Pilot error.  Running in interactive mode, Tcl will automatically
try and exec outside commands, which dir is (actually, a subcommand
of $env(COMSPEC).  The user needs
   exec $env(COMSPEC) /c dir
or even better, use the Tcl file commands instead. 
-- 11/29/1999 hobbs
welch Closed ticket [218301ffff]. [History diff]2000-10-26 08:18:59
dgp Ticket [218301ffff]: 3 changes [History diff]2001-04-19 04:12:46
Log in (anonymous is fine) to add a comment.