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

search file

Status
Not open for further replies.

stewang

Programmer
Aug 21, 2003
77
NZ
Hello all:
Could anyone tell me how to pop a dialog box for search a file, please.

Thanks

rgds
stewang
 
do you mean "search for a file" (which would be "set filename [tk_getOpenFile]")?

Or do you mean to search a given file for some text:
set fid [open <filename> r]
set str1 [read $fid]
set indx [string first &quot;string to find&quot; $str1]

Or something else altogether?

Bob Rashkin
rrashkin@csc.com
 
Sorry, I make you confuse.
My question is how to search a file If I don't known which directory the file is belong to.
For example, if I try to looke for the file of &quot; test.tk &quot; , but I don't where they are,or I am not sure I have this file or not, then I go to the function of search, and type some reletive word, some thing like &quot;ts.tk&quot;, then it will bring out a dialog box to tell me whether they have this file,if they have, it bring out some files which are close to the &quot;ts.tk&quot;, and its corresponding position(which directory).

Could you help to solve this problem.

Thanks
rgds
stewang
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top