473,396 Members | 1,734 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.

is a file blocked?

Is there any way to know if a file is blocked, because it's being used by
another process?
Jul 21 '05 #1
3 1226
Try to access/open it for read/write and see wheather an exception occures?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Alejandra Parra" <al*******@hotmail.com> schrieb im Newsbeitrag
news:#4*************@TK2MSFTNGP12.phx.gbl...
Is there any way to know if a file is blocked, because it's being used by
another process?

Jul 21 '05 #2
I do it, and even I have a try-catch segment, my program stops with an
error, so I want to check if the file is being used before it causes the
problem

"cody" <no****************@gmx.net> escribió en el mensaje
news:uW**************@TK2MSFTNGP09.phx.gbl...
Try to access/open it for read/write and see wheather an exception occures?
--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Alejandra Parra" <al*******@hotmail.com> schrieb im Newsbeitrag
news:#4*************@TK2MSFTNGP12.phx.gbl...
Is there any way to know if a file is blocked, because it's being used by another process?


Jul 21 '05 #3
Post your code, Alejandra. We may be able to find the problem or make
suggestions on how to fix it.

This particular error is trappable.

--- Nick

"Alejandra Parra" <al*******@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP12.phx.gbl...
I do it, and even I have a try-catch segment, my program stops with an
error, so I want to check if the file is being used before it causes the
problem

"cody" <no****************@gmx.net> escribió en el mensaje
news:uW**************@TK2MSFTNGP09.phx.gbl...
Try to access/open it for read/write and see wheather an exception

occures?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Alejandra Parra" <al*******@hotmail.com> schrieb im Newsbeitrag
news:#4*************@TK2MSFTNGP12.phx.gbl...
Is there any way to know if a file is blocked, because it's being used by another process?



Jul 21 '05 #4

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

Similar topics

9
by: vKp | last post by:
I'm having a problem with file(). If I try to open a url of the form "http://example.com/find?one,two", I get an error of the following form: ....failed to create stream: Bad file descriptor... ...
17
by: laurenq uantrell | last post by:
In master.dbo.sysprocesses I can filter for blocked users (Blocked >0) and I can create a self join(ON SPID = Blocked) to see what user Loginame is causing the block. In the column I can see the...
5
by: kathyk | last post by:
Hi All, We are moving to Access 2003 in a month or so, so i started testing my data base files in v2003. When The mdb open I get 3 warning messagase about blocking unsafe expressions. Security...
4
by: Dr. J | last post by:
How to terminate a blocked thread? In my form's "load" I launch a TCP listening thread that stays in an infinite loop waiting for incoming TCP packets. In this form's "closing" I try to...
3
by: Chris | last post by:
I posted a question earlier about zip file not being able to be opened in Windows Explorer when the zip file was created with SharpZipLib. It turns out I can't unzip or open the file because it is...
0
by: David Talbot | last post by:
I have a web application that featues the ability to export data to excel. The application opens in a popup window from the login page that detects if the application's popup window is blocked...
0
by: Raj | last post by:
What is the purpose of file system caching while creating a tablespace? Memory on the test server gets used up pretty quickly after a user executes a complex query(database is already activated),...
5
by: Raj | last post by:
What is the purpose of file system caching while creating a tablespace? Memory on the test server gets used up pretty quickly after a user executes a complex query(database is already activated),...
2
by: Dave | last post by:
I have a program that unzips a file and processes the extracted file. This works fine on my local machine but when I run it on a Win 2003 server I receive the error, "Windows has blocked the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...

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.