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

File open check command

Status
Not open for further replies.

nikhil079

Technical User
Oct 24, 2010
4
US
Hi,
I am new to Tcl language and there must be some command I am missing here.

Using tcl script, I want to check if a file is already open on a machine. Is it possible? (when I say 'Open', I mean, user either double click on a that file to read its contents or some other process to open the file.)

Thanks in advance..

Regards
Nikhil
 
I don't think such a command exists. All Tcl can tell you is if Tcl can or can't access a file. This would be by attempting to open it and catching the error (with 'catch'). You can also execute any OS command with "exec" but, again, I don't know what will tell you if a file is open.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top