Question

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

Does this work on XP and Vista?

Was it helpful?

Solution

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);

OTHER TIPS

Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top