I am using VSTS 2008 + C# + .Net 3.5 to develop a console application. For file access, we can access file in exclusive mode which blocks other process/thread from access th
I think what you can do is set the directory's Access Control and then change it back when your done. Have a look here:
http://msdn.microsoft.com/en-us/library/system.io.directory.setaccesscontrol.aspx