?
Solved

Copying locked files???

Posted on 2001-08-20
10
Medium Priority
?
234 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
  • 2
  • 2
  • 2
  • +3
10 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 800 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
Technology Partners: 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

840 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