Solved

Copying locked files???

Posted on 2001-08-20
10
224 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 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 107
Exception thrown at 0x00007FFD5BC81F28 7 38
Safe conversion? 4 58
FMX TCameraComponent Problem 2 53
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now