Questions tagged [special-folders]

"Special folders" refers to directories in the Windows operating system that provide extended functionality in the user interface. Prominent examples are the "Desktop", "Start Menu", the "My Documents" and the "Fonts" folders.

The physical location and the number of special folders depend on the Windows version and system language.

Windows transparently manages the correlation between physical location on the disk and representation in the shell namespace, so these folders are best retrieved through the Windows API, as opposed to using fixed paths.

200 questions
4
votes
1 answer

Drawable folders replaced with mipmap folders in Xamarin.Android project in Visual Studio 2017?

When I created Xamarin.Android project in Visual Studio 2017 2 years ago in Resources folder I had drawable folder and drawable-hdpi, drawable-mdpi, drawable-xhdpi etc. folders. If I remember well I put the image I wanted to use in the application…
Pirlo
  • 99
  • 1
  • 1
  • 9
4
votes
1 answer

How can .NET TraceListener be configured to log to TEMP folder

How can .NET TraceListener be configured to log to TEMP folder? Is it possible to do this in app.config like: .. without making any…
calinc
  • 51
  • 2
4
votes
1 answer

userprofile path returns Default while running as a schedule task

I have created following C# console app: var userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name; var path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); var path2 =…
huseyint
  • 14,953
  • 15
  • 56
  • 78
4
votes
2 answers

Java api to get Microsoft Windows Special folders

I once found a nifty little library that used JNI to allow java applications on Windows to get the locations of various "special" directories on windows. I can't for the life of me find it again... In particular, I need to get the location of the…
SvrGuy
  • 376
  • 4
  • 11
4
votes
1 answer

Difference between Environment.GetFolderPath(Environment.SpecialFolder.System) and Environment.SystemDirectory for System32 folder

I want to get the path system32 path on 32 bit Windows and SysWOW64 on 64 bit Windows. Both Environment.GetFolderPath(Environment.SpecialFolder.System) and Environment.SystemDirectory work fine. Which one should I prefer and use? I am using .NET 2.0
Computer User
  • 2,839
  • 4
  • 47
  • 69
4
votes
1 answer

Access Computer's Default AppData Folder

I am currently trying to use the following to access a computer's local AppData folder: Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); This returns something along the lines of C:\\Users\\[USERNAME]\\AppData\\Roaming.…
mastur cheef
  • 185
  • 1
  • 3
  • 15
4
votes
1 answer

Is there some ready function to parse %specialfolders%?

I would like my command line program to take file parameters in the form: -out:%MyDocuments%\dummy.xps and having %MyDocuments% automatically replaced with: Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) I know it's an easy to…
Felice Pollano
  • 32,832
  • 9
  • 75
  • 115
4
votes
1 answer

DirectoryNotFoundException when calling Directory.GetDirectories on Environment.SpecialFolder.Favorites due to Domain Folder Redirection

I have some C# code that tries to get the Favorites for the currently logged in user. The code is part of a Taskbar Toolbar that gets loaded into the Windows Explorer process. I have a user who is using Windows Vista with UAC enabled on a domain…
John Rennemeyer
  • 455
  • 9
  • 17
3
votes
1 answer

How to get the path to CSIDL_COMMON_DOCUMENTS in .NET 3.5?

I am making a custom action for an installer. It must read a file stored in CSIDL_COMMON_DOCUMENTS to determine the install directory. (I'm hoping it won't be an issue to change the install directory in a custom action, but that's a different…
japreiss
  • 11,111
  • 2
  • 40
  • 77
3
votes
2 answers

.Net use of special folder notation

I want to be able to do something like this: IO.Directory.Exists("%USERPROFILE%") The reason being that I want to specify one of the directories which my application will use, as plain text in a config file. In some cases I will want it to be…
andyhasit
  • 14,137
  • 7
  • 49
  • 51
3
votes
5 answers

Check if DirectoryInfo.FullName is special folder

My goal is to check, if DirectoryInfo.FullName is one of the special folders. Here is what I'm doing for this (Check directoryInfo.FullName to each special folder if they are equal): DirectoryInfo directoryInfo = new DirectoryInfo("Directory…
Vano Maisuradze
  • 5,829
  • 6
  • 45
  • 73
3
votes
2 answers

How to show elements from MyComputer folder?

MyComputer folder doesn't have any object in file system. But i need show elements from this folder into ListView (WinForms). I think, it's imposible to get System.IO.DirectoryInfo that represents MyComputer folder. Is it true? I can get disks…
Eugene Maksimov
  • 1,504
  • 17
  • 36
3
votes
2 answers

about Environment.SpecialFolder

I want to access my "My documents" folder from my WinForms ToolStrip menu. I am populating ToolStrip with a XML file. I am storing Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) in my XML file. It is throwing an error. Can anyone…
Lilly
  • 31
  • 1
  • 4
3
votes
2 answers

Windows "Documents and Settings" in another languages

My C# program traverse a drive for some data stored under user profile folder. I need to know whether some particular folder is "Documents and Settings". I cannot use SpecialFolders trick because I traverse not my system drive, but some attached…
Alex
  • 1,357
  • 3
  • 18
  • 41
3
votes
1 answer

InnoSetup can't find 'My Documents' on Win XP installed on Mac Parallels

I'm stuck trying to help a user install our software. Our software setup is distributed using InnoSetup, and he is installing it on a Mac Pro with Parallels and Windows XP. During installation, InnoSetup fails with: Internal error: Failed to expand…
Irish Buffer
  • 852
  • 1
  • 8
  • 11