Who is currently using file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a number of apps which are compiled to a shared network directory.
Users run the executables from this directory.

When rebuilding my apps I cannot complete the build if the executable is in
use.

I would like a simple app that would browse the file(s) in that network
directory and return the name/machinename of the person currently using the
file (so that I can ontact them and tell them to close the app)

Is that possible and does anyone have suggestions for where to start with
such a project

Regards

Michael Bond
 
Michael,

Round what you ask, you would have to make your application as it is done in
Office. It is in my opinion one of the big ommissions that you cannot get it
from the OS (I don't know one that gives it). Don't forget that you need
for that the filesystem information, which still can be FAT.

Just my thought,

Cor
 
If all the file connections applications are coming across the network, you
can ask the OS who has the files open. To do this, go to the server console
and right click on My Computers. Select Manage. This expand the System
Tools -> Shared Folders tree. Look in "Open Files" and you will see is
using each file on the server. Unfortunately, this only works across the
network and not for machine local processes.

Mike Ober.
 
Michael

thanks ...... but ..... I'm only a humble user who has programming skills
(and uses them to the betterment of my company) ...... heaven forbid the Tech
Support people would allow me access to the Server! .... if only!

My thinking is that if I try to delete a file, using File Explorer as any
other user would, and that file is in use by someone else on the network,
Windows would tell me "cannot delete the file .... it is in use". Now, to my
thinking, there must be a "flag" or an "attribute" somewhere on that file
which allows Windows to declare it as "in use" and its that "flag" or
"attribute" I'd lilke to grab (hoping that it somehow includes the name or
machine name of the user)

The Server Console solution is the simple one ..... but in my organisation
we don't do simple if we can avoid it!

Regards

Michael
 
Michael

I should add that I am looking for this to address the problem with my older
apps. I have found a way of resolving the issue for future apps ....... each
project I now design, for inclusion on the network, writes (appends) "started
&" system info to a text file when the executable is fired up, and "ended &"
system info to the same file when the app is closed. That keeps track of who
is using the executable. I want the other solution to avoid having to
re-write all of my other apps (just being lazy I suppose)

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top