473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Who is currently using file

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
Nov 21 '05 #1
4 1351
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
Nov 21 '05 #2
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.

"mabond" <ma****@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
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


Nov 21 '05 #3
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 D. Ober" wrote:
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.

"mabond" <ma****@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
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


Nov 21 '05 #4
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
"Michael D. Ober" wrote:
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.

"mabond" <ma****@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
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


Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brian | last post by:
On a Slackware 9.1 box, I'm trying to detect if mpg123 is currently running/playing a song so that when the song is done, it'll play the next in the list. The problem is that popen'ing ps doesn't...
1
by: rn5a | last post by:
How do I find out whether a file is currently being used by some process or not (including the ASP.NET process)? A Web Form has a ListBox which lists all the directories & files existing in a...
11
by: fniles | last post by:
One of our application uses VB6 and Access97 database. Another application uses VB.NET 2005. This morning for about 15 seconds when the application tries to read either a query or a table from the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.