Solved

Copying locked files???

Posted on 2001-08-20
10
229 Views
Last Modified: 2012-05-04
Hi,

Is it possible to copy a file which another process as taken out a lock on? For example, MS Access locks all .mdb files when databases are open.

Strange question, I know... that's what locks are there for!! However, I'm writing a backup program and would very much like to backup these files, even when they are open. I only need read access to them.

Any ideas?
Kieran
0
Comment
Question by:dbaser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
10 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 6406439
>>Is it possible to copy a file which another process as
>>taken out a lock on?

You cannot (not in a reliable, documented way). Backup SW is supposed to run when nobody is using other programs...
0
 
LVL 32

Expert Comment

by:jhance
ID: 6406885
Whether you can read a locked file or not depends on how the "owner" of the lock has designed it.  If it's EXCLUSIVE then there is no way to do it since Windows prevents any other access.  Most backup SW that I've seen/used just reports those files that are locked since they cannot be backed up.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6407145
>>Most backup SW
>>that I've seen/used just reports those files that are
>>locked since they cannot be backed up.

That's why my backups are scheduled to run when I'm guaranteed not to be there and have files locked ;o)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dbaser
ID: 6407421
Spanx All,

Yep... that's what I figured alright.

Just wondering if anyone knew any sly ways around it!! :)

Thanks anyway,
Kieran
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 6408597
What platform are you use?
0
 

Author Comment

by:dbaser
ID: 6409902
I'm using Windows 2000.

I've since seen a program advertised on the web called "Open File Manager". The blurb say that is "software that enables most backup software, including Windows 2000/NT backup, to capture open files during the backup/copy process - even if the files are changing."

http://www.gateway-websites.com/cgi-bin/ePages4.storefront/3b826642007d8382271dc0a80b6506f8/Export/products/112300-2D1001973

Anyone got any ideas how this works????
0
 
LVL 11

Expert Comment

by:griessh
ID: 6996402
Dear dbaser

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to

     "refund the points and PAQ at zero points"

since nobody had a satisfying answer for you.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 32

Expert Comment

by:jhance
ID: 6996412
I suggest you force accept jkr here.  His comment is both first and accurate.

I'll just point out again that SOMETIMES the correct answer is NO, IT CANNOT BE DONE.  Not liking the answer doesn't make it any less correct.
0
 
LVL 11

Expert Comment

by:griessh
ID: 6996535
Thanks for the feedback. I completely agree with your "NO" statement (jkr was my initial suggestion). What made me change my mind was the last question about "Open File Manager". But since there is proof that it really works, I guess you are right with jkr.

======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7011247
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question