Thursday, October 30, 2008

How to retrieve MyDocuments Folder using C# (.NET)

To retrieve the logical MyDocuments use the following

Console.WriteLine("MyDocuments := " + Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments));

See also:

Retrieving Special Folders using FileSystemObject (VBA / VB)

1 comment:

  1. How can we retrieve the My documents folder of logged in user in a windows service.

    Regards
    Nauman Farooq
    Technology Blogs

    ReplyDelete