C#: How do you get Application data folder path for current user?

Its really simple actually

You should be looking at this Global class

[geshi lang=”csharp” nums=”1″ target=”_self” ]


This class has a function called called GetFolderPath. This is how you use it

[geshi lang=”csharp” nums=”1″ target=”_self” ]


This method takes Environment.SpecialFolder (Type Enum) as an argument.

So for final solution you should be looking at this

[geshi lang=”csharp” nums=”1″ target=”_self” ]

// thus if you want to read a file from this folder you can initialize a variable as

var fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "YOUR_FILE_NAME.EXTENSION")

MSDN Resources:

Environment.SpecialFoler Enumeration is explained here


Environment.GetFolderPath Method is explained here


P.S.: I am not a C# expert but occasional C# user for smaller projects.

I hope this helps




Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.