Moving files to a shared folder

  • Thread starter Thread starter Hubert Wong
  • Start date Start date
H

Hubert Wong

Hi,

I am writing some C# code that moves files from a source folder to a
target folder on the same machine. However, if the target folder is a
shared folder, using the File.MoveTo method alone does not cause the
files to be shared as well. How can I make the moved files inherit the
parent folder's shared setting? I have looked into the
System.Security.Permissions.FileIOPermission class but it doesn't seem
to do what I'm looking for. I'm pretty new to .NET development so any
help would be appreciated.
 
Hubert said:
Hi,

I am writing some C# code that moves files from a source folder to a
target folder on the same machine. However, if the target folder is a
shared folder, using the File.MoveTo method alone does not cause the
files to be shared as well. How can I make the moved files inherit the
parent folder's shared setting? I have looked into the
System.Security.Permissions.FileIOPermission class but it doesn't seem
to do what I'm looking for. I'm pretty new to .NET development so any
help would be appreciated.

Never mind, I figured it out using the libary here:
http://www.codeproject.com/dotnet/NTSecurityNET.asp
 
Back
Top