Skip to content

Need to access a public folder using c#

flipmode darksoul

Asked Oct 10, 2005, 11:25 PM EDT1 answer
Share
LinkedInX
i need to access a public folder, then i need to copy the contents of that folder to another folder and then delete the contents of the public folder ....
can any1 help...

thanks flipmode

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    look at System.Environments.SpecialFolder using the following method.

    public static string GetFolderPath(  Environment.SpecialFolder folder);

    This will allow you access to all the folders with special meanings on the pc. (i.e application data, temporary internet files, etc).

    Use system.io.Directory.GetFiles(dir) to get all the files. File.Copy to move them, File.Delete to delete them.

    Matt
    0