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
process.".
Any ideas ?
process.".
Any ideas ?
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
That depends on the FILE_SHARE flags used by the process that opened the file before yours did.