tags:

views:

4031

answers:

4

I want to point a file dialog at a particular folder in the current user's Local Settings folder on Windows. What is the shortcut to get this path?

+2  A: 

See this link to get the path you're looking for.

Brian R. Bondy
+1  A: 

Environment.GetFolderPath(Environment.SpecialFolders.LocalApplicationData);?

i can't remember if there is a "Local Settings" folder on xp anymore, seems vaguely familiar

Darren Kopp
+12  A: 

How about this, for example:

String appData = 
    Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

I don't see an enum for just the Local Settings folder.

http://web.archive.org/web/20080303235606/http://dotnetjunkies.com/WebLog/nenoloje/archive/2007/07/07/259223.aspx has a list with examples.

Matthew Maravillas
The link is dead.
DrDro
Updated it with the Internet Archive link.
Matthew Maravillas
A: 

[quote] Environment.GetFolderPath(Environment.SpecialFolders.LocalApplicationData);?

i can't remember if there is a "Local Settings" folder on xp anymore, seems vaguely familiar [/quote]

Temporary folder for a user resides in 'Local Settings' directory.. you can access it by typing '%temp%..\' in Run. Path is 'C:\Documents and Settings\UserName\Local Settings'

In vista and later, you can access it by "%temp%..\" or "%tmp%..\" Path is 'C:\Users\UserName\AppData\Local\'

BeediKumaraN