Block Files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way so I can tell a C# application to block a file from been
copied by another application.
For example I have two application running, there is a posibility that
both application try to do a
File.Copy trying to access the same file.
So I need a way in which I can block that file from been copied by any other
applications or executables.
 
Sorry, I made a mistake actually y the call is a File.Move.
what do you mean with open the file in exlusive mode,
is something like the
Filstream with FileShare.None parameter on the constructor,
but there is still the change that when I close the original file,
the other application takes it too.
 
Back
Top