Need help copying files open/locked by other processes

  • Thread starter Thread starter PesoMemo
  • Start date Start date
P

PesoMemo

I'm not too Windows savvy - in UNIX it would not be an issue since I could
become root and do as I wish.

But my need is to copy files that other processes have open and I do not
want to kill them and I do not have control of their source, so I can't
modify them. I simply want to copy the files they have open by overriding
the file locking due to non-shared permissions or actual locks on the file.
There should be a way to override these permissions by some special flags or
by becoming a special user, but I've been searching and searching to no avail.

I would think that backup software is capable of doing this, so I'm thinking
there is indeed a way to do it. Can anyone help me ? I've tried shelling
out to COPY/XCOPY, but no help.

I'm on XP Pro - NTFS file system.
 
PesoMemo said:
I'm not too Windows savvy - in UNIX it would not be an issue since I could
become root and do as I wish.

But my need is to copy files that other processes have open and I do not
want to kill them and I do not have control of their source, so I can't
modify them. I simply want to copy the files they have open by overriding
the file locking due to non-shared permissions or actual locks on the
file.
There should be a way to override these permissions by some special flags
or
by becoming a special user, but I've been searching and searching to no
avail.

I would think that backup software is capable of doing this, so I'm
thinking
there is indeed a way to do it. Can anyone help me ? I've tried shelling
out to COPY/XCOPY, but no help.

I'm on XP Pro - NTFS file system.

You could use the "Shadow Copy" option in ntbackup.exe.
 
Pegasus (MVP) said:
You could use the "Shadow Copy" option in ntbackup.exe.

I'm not sure I can figure out how to do single files with that (although it
might be possible), but if ntbackup can indeed do it, then what I really
would like to know is just exactly how it does it - then I could do it myself
on an individual basis programatically using the appropriate library
functions/calls/options/flags.
 
PesoMemo said:
I'm not sure I can figure out how to do single files with that (although
it
might be possible), but if ntbackup can indeed do it, then what I really
would like to know is just exactly how it does it - then I could do it
myself
on an individual basis programatically using the appropriate library
functions/calls/options/flags.

Use the ntbackup wizard to create a job and specify that it should run later
on. You can now pick the command line from the scheduled task created by
ntbackup.exe. You can also see the .bks selection file it uses. This will
show you how to make your file selections. Note that the .bks file is saved
in Unicode format. If you save it as an ASCII file then the job will fail.

I suggest you use a search engine to find out details of the shadow copy
process. I suspect that it issues a request to all programs with open files
to write pending data to the file - but perhaps I'm wrong. The boys in the
Windows Server group might be able to tell you more.
 
PesoMemo said:
I'm not too Windows savvy - in UNIX it would not be an issue since I could
become root and do as I wish.

But my need is to copy files that other processes have open and I do not
want to kill them and I do not have control of their source, so I can't
modify them. I simply want to copy the files they have open by overriding
the file locking due to non-shared permissions or actual locks on the file.
There should be a way to override these permissions by some special flags or
by becoming a special user, but I've been searching and searching to no avail.

I would think that backup software is capable of doing this, so I'm thinking
there is indeed a way to do it. Can anyone help me ? I've tried shelling
out to COPY/XCOPY, but no help.

I'm on XP Pro - NTFS file system.

If your desire is truly to _unlock_ a file then the program Unlocker (what
else?) will likely do the job for you. At least it has worked well for me
for a few years. Of course you are possibly walking into a hornet's nest
when you unlock a file if you do the wrong thing with it or your unlocking
of it gives some other process the ability to do damage.

http://ccollomb.free.fr/unlocker/
 
Try one (or both) of these:


CopySharp 336 KB (GUI)
"CopySharp is a GUI tool for copying open/inprocess/locked files."

Info:
http://www.amitchaudhary.com/

Download:
http://www.amitchaudhary.com/CopySharp.zip

--------------------------

HoboCopy 474 KB (CL)
"You pass it a source directory and a destination directory, and it
makes a recursive copy using VSS."

Info:
http://www.pluralsight.com/community/blogs/craig/archive/2006/09/20/38362.aspx

Download:
http://internap.dl.sourceforge.net/sourceforge/wangdera/HoboCopy-1.0.0.0-XP-32bit-Release.zip


ju.c
 
Back
Top