Reply To: tcl – Checking for files

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf tcl – Checking for files Reply To: tcl – Checking for files

#57034
Jim Kosloskey
Participant

You could use the tcl glob command which returns a list of all entries found matching a glob pattern. I would use the nocomplain switch so that an empty set would not throw an error.

If you are concerned that a subdirectory might match the pattern, you could then work the list using ‘file isfile’ or ‘file isdirectory’.

Jim Kosloskey

email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10