Location of My Pictures

rudigrobler picture rudigrobler · Sep 22, 2008 · Viewed 12.2k times · Source

How do I programatically (Using C#) find out what the path is of my My Pictures folder?

Does this work on XP and Vista?

Answer

Andrew Grant picture Andrew Grant · Sep 22, 2008

The following will return a full-path to the location of the users picture folder (Username\My Documents\My Pictures on XP, Username\Pictures on Vista)

Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);