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?
Show activity on this post. You can use Application. StartupPath. It Gets the path for the executable file that started the application, not including the executable name.
C:\Documents and Settings\[MyName]\Local Settings\Application Data holds data regarding configuration files, settings, and other data which may/may not be required.
You may find that folder's contents in 'C:\Users\YourUserID\AppData\Local' folder in Windows 10.
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.
string localPath = Directory.GetParent(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)).FullName;
is the simple answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With