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!

Using 'glob' to get a listing of files

Status
Not open for further replies.

Vinni

Programmer
Aug 14, 2002
11
US
Hi there,

I am using following code lines to get a list of files:

set listFiles [glob -nocomplain "C:/test_Imagefiles/*.gif"]

I can't get it working. I am on Windows2000 platform. What am I doing wrong ? Any suggestions ?

thanks
 
It seems to me it is working.
Try to remove the option nocomplain to see what kind error message you may get.

Peter

% set filelist [glob -nocomplain "C:/Program Files/*.exe"]
{C:/Program Files/Win2000PPAHotfix.exe}
 
"I can't get it working"

Can you describe what happens and what is unwanted?
A short example should be welcomed.

ulis
 
How 'bout [glob -nocomplain c:/test*/*.gif] ??
 
I am trying to create a list of all the '.gif' files using:

set listFiles [glob "C:/test_Imagefiles/*.gif"]


I get following error message:

no files matched glob pattern "C:/test_Imagefiles/*.gif"
while executing
"glob "C:/test_Imagefiles/*.gif""
invoked from within
"set filelist [glob "C:/test_Imagefiles/*.gif"]"


 
I think the diag is correct.
Can you try:
cd C:/test_Imagefiles
puts [glob *.gif]
?

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top