Hi guys,
Done some real basic things in TCL and have now want to do something slighty harder.
I'm cd'ing to a directory that I know has a number of files of a certain type eg jpgs. These have a format similar to the following:
picture01.jpg
picture02.jpg
...
What I want to do is to get hold of the complete filename of the first jpg file I find in the directory.
How do I do this???
I then want to end up with just the word picture ie remove the 01.jpg part. I'm planning on using the following
set tmp [string range $word 0 end-6]
Is this the best way of doing this?
Cheers
Done some real basic things in TCL and have now want to do something slighty harder.
I'm cd'ing to a directory that I know has a number of files of a certain type eg jpgs. These have a format similar to the following:
picture01.jpg
picture02.jpg
...
What I want to do is to get hold of the complete filename of the first jpg file I find in the directory.
How do I do this???
I then want to end up with just the word picture ie remove the 01.jpg part. I'm planning on using the following
set tmp [string range $word 0 end-6]
Is this the best way of doing this?
Cheers