views:

512

answers:

3

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

Does this work on XP and Vista?

+2  A: 

Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);

dbrien
+14  A: 

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);
Andrew Grant
A: 

Using Microsoft.VisualBasic.FileIO.SpecialDirectories.MyPictures you can get that, works in vista and XP.

Eduardo Campañó