473,396 Members | 2,033 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.

howto check if somebody allready opened a file (in a network)

Hi There,

my vb app can open files. Well, actually my vb app launches word or excell
to open them.
These files are shared in a network.

If somebody else has allready opened that file, you must get a requester
that says the file is temporarily unavaillable because it is edited somewere
else.

How do you test if somebody has allready opened that file?

I'll check this group regular basis......

Best regards,

Martijn

Jul 17 '05 #1
2 8258
Try:

Obtaining Open File Information from Another Machine
Use NetFileEnum to return a listing of open files and owners on remote
machines.
http://vbnet.mvps.org/code/network/netfileenum.htm

Note however this method is valid only on Windows NT4 / Windows 2000 /
Windows XP or later.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"martijn" <ma**********@wanadoo.nl> wrote in message
news:40***********************@news.wanadoo.nl...
: Hi There,
:
: my vb app can open files. Well, actually my vb app launches word or excell
: to open them.
: These files are shared in a network.
:
: If somebody else has allready opened that file, you must get a requester
: that says the file is temporarily unavaillable because it is edited
somewere
: else.
:
: How do you test if somebody has allready opened that file?
:
: I'll check this group regular basis......
:
: Best regards,
:
: Martijn
:
:
:

Jul 17 '05 #2
gonna try it, will let the group know... thanks!!

"Randy Birch" <rg************@mvps.org> schreef in bericht
news:6I***************@news04.bloor.is.net.cable.r ogers.com...
Try:

Obtaining Open File Information from Another Machine
Use NetFileEnum to return a listing of open files and owners on remote
machines.
http://vbnet.mvps.org/code/network/netfileenum.htm

Note however this method is valid only on Windows NT4 / Windows 2000 /
Windows XP or later.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"martijn" <ma**********@wanadoo.nl> wrote in message
news:40***********************@news.wanadoo.nl...
: Hi There,
:
: my vb app can open files. Well, actually my vb app launches word or excell : to open them.
: These files are shared in a network.
:
: If somebody else has allready opened that file, you must get a requester
: that says the file is temporarily unavaillable because it is edited
somewere
: else.
:
: How do you test if somebody has allready opened that file?
:
: I'll check this group regular basis......
:
: Best regards,
:
: Martijn
:
:
:

Jul 17 '05 #3

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

Similar topics

1
by: TJRobertsJob | last post by:
Was wondering if someone could help. Over the last month I've been developing a small database application, using Access 2000, for use in a friends shop. Everything was going well until about a...
3
by: Pete Atkins | last post by:
Help!!!!!!!! This may have been posted bfore, but i cannot find it. Have written a db in access 2003, opened in access 2000, saved, re-opened,etc - all was fine. Added some new forms /...
0
by: Li Pang | last post by:
Hi Anybody knows how to check a pre-opened ie browser is alive and how to activate or close it Thanks in advance
4
by: Omko H | last post by:
I am trying to open %windir%\pfirewall.log. and I just can't get it to work (I am a absolute newbie to VB.net) the strange thing is that notepad is perfectly able to view the file. but my code...
3
by: dmitrey | last post by:
hi all, howto check is object Arg1 - a func, lambda-func - something else? I tried callable(Arg1), but callable(lambda-func) returnes False Thx, D.
8
by: dmitrey | last post by:
howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Thx in advance, D.
0
neo008
by: neo008 | last post by:
Hi all, What if somebody deletes database file (.mdb)? Can I prevent? NE☼
0
by: hidara | last post by:
I have an excel file that I need to check if its in use by another before i open it. I have found various forms of the follwing code but each one give me the same errors at the following 2 lines...
1
by: dmitrey | last post by:
hi all, howto check is function capable of obtaining **kwargs? i.e. I have some funcs like def myfunc(a,b,c,...):... some like def myfunc(a,b,c,...,*args):... some like
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.