views:

454

answers:

2

Is there a way to read a locked file across a network given that you are the machine admin on the remote machine? I haven't been able to read the locked file locally, and attempting it over the network adds another layer of difficulty.

+1  A: 

Depending on the type of lock (read only vs exclusive) it should be possible to copy the file first, then you can work with the unlocked copy.

You should be able to do that in a background thread. If you really like threading, have the file watcher start the read process once the copy is complete (although that might be overkill)

Doug L.
I've found that to not be 100% reliable. It is a valid approach though.
midas06
+1  A: 

There is no problems to READ the file locally or remotely if it's not locked EXCLUSIVELY or READ/WRITE. If the file is locked - your administrative rights will not help (even if you're GOD :-). If the file is not locked fore READ (you can check it by opening it with a notepad) - you can read it locally and remotely (it doesn't matter, unless your network share is putting some extra restrictions).

IgorM