Reply to comment
Who has files open on the network
The WhoHasFileOpen utility displays the list of users who have specific file(s) open on network. Works on Windows NT Platform (Windows NT 4.0, Windows 2000, etc). This code detects only the files opened using a net shared path. It does not return the files opened by a user on the local computer using a local path.
The code is based on Ramon F. Jaquez's UT FAQ #7896 Who opened what files on the network? (modified to use only VFP code).
Thanks Kevin Delaney for code cleanup which made possible to post it here for download .
The code uses Windows API support class which is included in the download WhoHasFileOpen.zip as well.
A user running this program must be a member of the Administrators or Account Operators local group on the file server where files are located.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
Examples
* Mapped drive, specific file 'Sometable.dbf' WhoHasFileOpen("X:\Somefolder\SumSubfolder\Sometable.dbf") * Mapped drive, all extensions for specific file name 'Sometable' WhoHasFileOpen("X:\Somefolder\SomeSubfolder\Sometable") * UNC path, specific file 'Sometable.dbf' WhoHasFileOpen("\\SomeServer\SomeShare\Somefolder\SomemSubfolder\Sometable.dbf")
Recent comments
1 week 4 days ago
4 weeks 19 hours ago
4 weeks 23 hours ago
4 weeks 1 day ago
4 weeks 1 day ago
5 weeks 2 days ago
8 weeks 2 days ago
10 weeks 4 days ago
12 weeks 2 days ago
12 weeks 3 days ago