473,320 Members | 1,957 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,320 software developers and data experts.

Detecting whether a file is locked by another process or not...........


Would this just be a case of trying to open the file and handling the
exception intelligently? I hope not - I don't like exceptions.....

Robin
Nov 20 '05 #1
3 1010
Cor
Hi Robin,

But in my opinion, this is were the exception is made for.

You have no influence on that in your program (except if the file would have
an attribute that it is busy or something and as far as I know that does not
exist).
Would this just be a case of trying to open the file and handling the
exception intelligently? I hope not - I don't like exceptions.....


Cor
Nov 20 '05 #2
"Robin Tucker" <id*************************@reallyidont.com> schrieb

Would this just be a case of trying to open the file and handling
the exception intelligently?
AFAIK that's the only reliable way.
I hope not - I don't like
exceptions.....

Me too, unless they are caught. ;-)
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #3
Thanks Cor, you are on fire today :)

"Cor" <no*@non.com> wrote in message
news:uz**************@TK2MSFTNGP12.phx.gbl...
Hi Robin,

But in my opinion, this is were the exception is made for.

You have no influence on that in your program (except if the file would have an attribute that it is busy or something and as far as I know that does not exist).
Would this just be a case of trying to open the file and handling the
exception intelligently? I hope not - I don't like exceptions.....


Cor

Nov 20 '05 #4

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

Similar topics

6
by: Pekka Niiranen | last post by:
Hi, I have used the following example from win32 extensions: -----SCRIPT STARTS---- import win32file import win32con import win32security import pywintypes
4
by: Earth Worm Jim | last post by:
I am using VS.Net 2003 on Windows 2003 Server (standard edition) and I am getting "The process cannot access the file because it is being used by another process" on DLL's in a VS.Net solution. ...
3
by: Sagaert Johan | last post by:
I have a program that uses the filesystemwatcher. Problem is that i have to wait until the file is closed before i can do someting with it in the changed event. How can i detect if the...
2
by: James Colannino | last post by:
Hey everyone. I'm writing a small application in Python that uses os.fork() to create a separate process in which another application is run in the background. The problem is that I need to know...
1
by: ABCL | last post by:
Hi All, I am working on the situation where 2 different Process/Application(.net) tries to open file at the same time....Or one process is updating the file and another process tries to access...
13
by: George | last post by:
Hi, I am re-writing part of my application using C#. This application starts another process which execute a "legacy" program. This legacy program writes to a log file and before it ends, it...
3
by: eugenet | last post by:
Hello, This is probably a newbie question. In my C# program, when I try to delete a file, I get an exception that the file is locked by another process. I would like to terminate the process...
8
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
Hi; I copied a new set of files over to my ASP.NET dir (and subdirs) on our test server. This replaced every file for the app. When I first then tried to bring it up, I got the below error. ...
7
by: Ganesh | last post by:
Hi, I would like to know if there is any way I can forcefully delete a file locked by another process on Windows as well as on Linux. On windows DeleteFile returns me error code 32 (Process...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.