How can I access the files that are in-use by other processes. Say there is this file called "locked.txt", which is in use by process A. Now how can I copy this file to another location programmatically. Normal methods will fail with the error "The process cannot access the file because it is being used by another

Any ideas ?
Posted on 2008-05-14 00:43:05 by shakuni
duplicatehandle might do it if you can get the handle for the file...... check out handles.exe from sysinternals, the method there is a nice one too
Posted on 2008-05-14 03:53:14 by evlncrn8
That depends on the FILE_SHARE flags used by the process that opened the file before yours did.
Posted on 2008-08-17 07:01:31 by Homer