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

Glob in command prompt

Status
Not open for further replies.

anarchistx

Programmer
Feb 21, 2005
4
US
Hi everyone,

I've installed activeTCL on my windows machine. I'm using tcl to script commands in the command prompt.

Everything is fine, I've been using exec cmd.exe /c [dos command] to run everything.

When I try to revert back to tcl commands such as glob, nothing happens.

I first tested to make sure glob works by
doing tclsh, which I get ->%
and type in ->glob *
and it works.

but when I use it in my script [test.tcl], I get no results. All my other tcl commands work just fine. Any ideas?

Thanks.
 
If I understand you correctly, you have a Tcl script that includes the glob command. You execute the script and you don't get what you expect.

Not to belabor the obvious, but you do know that glob returns a list, right? That is, the proper syntax is something like:
set myList [glob *]
Then myList's elements are the contents of the current directory.

What does the relevant portion of your script look like?

_________________
Bob Rashkin
 
=X .... totally missed it. Sorry, haven't used tcl in a little while, forgot to store it in as a variable. I am embarassed now.

Thanks bong for the quick response
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top