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
1
vote
2 answers

Is there any way to get Environment.SpecialFolder from file path?

I have a requirement where I want to get the Environment.SpecialFolder value from a file path. Eg - string filePath = @"C:\Program Files (x86)\text.txt" //SpecialFolder sf = GetSpecialFolderAssociatedWithPath(filePath); // sf will be…
Jasmeet
  • 1,315
  • 11
  • 23
1
vote
1 answer

%USERPROFILE%/Desktop no longer valid after relocating Desktop folder to OneDrive

I've moved my Windows 10's /Desktop folder to a different location. As a result, my batch and Powershell scripts that were pointing to %USERPROFILE%/Desktop no longer worked. Is there another way to get the location of my desktop without hardcoding…
1
vote
0 answers

How to store a special folder path in Settings.settings c#?

I am trying to insert in Settings.settings a special folder path (MyDocuments). I currently use this: Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) but hardcoded. I don't want to have it hardcoded, so I've decided to move it to…
Rares
  • 11
  • 2
1
vote
1 answer

Echo directory opened by shell:startup

When entering start shell:startup into the command prompt, it opens a new window at the startup folder. How can I print the path to that folder but not actually open the folder in explorer?
Andereoo
  • 834
  • 1
  • 8
  • 24
1
vote
2 answers

Execute Windows run dialog command in command prompt

In the Windows Run dialog, I can use the command shell:startup to open the user's startup folder. In hope to be able to use the command in the Windows command line, I tried typing shell in the command prompt, but returned with the error message…
Andereoo
  • 834
  • 1
  • 8
  • 24
1
vote
2 answers

Can anyone help me with the following JScript?

In Vista, I am trying to get "Local AppData" path for an user account (other than current user) on a local machine but facing some issue. can anyone pls help me what is wrong with the below code. var HKU = 0x80000003; var username =…
svv
  • 13
  • 3
1
vote
1 answer

Getting special Folder path for a given user in Jscript

How to get the path of a shell folder like "Local Settings" or "Local Appdata" for a specific user other than the current user?
harini
  • 11
  • 1
  • 3
1
vote
1 answer

will Environment.Special.LocalApplicationData be deleted when uninstalling the app in iOS?

In iOS, I am saving the downloaded images in Environment.SpecialFolder.LocalApplicationData and referring the images from that location as image source. Will the images saved in that location will be deleted when uninstalling the application in iOS?
Devi M
  • 39
  • 5
1
vote
1 answer

Is there a way to access a special folder path using a special folder name as a string using C#

I have a text value from an App.Config file I read which identifies a special folder to use such as "LocalApplicationData". I would like to use this text value to access an Environment.SpecialFolder value. I have tried the below code statement but…
Robertcode
  • 911
  • 1
  • 13
  • 26
1
vote
2 answers

is there a way on how to copy Temporary Internet Files?

help me how to copy file from Temporary Internet Files on xp or higher. copyfile not is working on it. i want to make it like CopyFileEx(scr, dst):boolean
XBasic3000
  • 3,418
  • 5
  • 46
  • 91
1
vote
0 answers

Access Denied for Users Special Folder

I Need to get users special folders size and remove unnecessary files. I have Administrator access, but in the first place i receive access denied exception. my code is static void Main(string[] args) { var basePath =…
1
vote
2 answers

Folder path of System.Environment.SpecialFolder.MyDocuments of Xamarin.Android in windows

In my Xamarin Android app I am storing screen shots in the following path System.Environment.SpecialFolder.MyDocuments. When I am running the app on windows simulator, where exactly this file get stored ? I searched almost my entire systen but no…
1
vote
1 answer

How to have a background picture in a folder on windows 7?

Ok so i was wondering if it was possible to write a program (any language) that could add, change, and/or remove a background picture for a folder on windows seven. On windows xp or older, you could accomplish this by editing the hidden file in…
daniel11
  • 2,027
  • 10
  • 38
  • 46
1
vote
1 answer

Environment.SpecialFolder and Impersonation

I use Visual Studio 2013, Windows 8.1. I try get Environment.SpecialFolder values from Impersonate user, but I get always empty string value. Any suggestions?. My test code: [TestMethod] public void Environment_Folders_is_ok() { …
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
1
vote
1 answer

How to access remapped special folders using PowerShell?

I remapped/changed the target/location of a few of my special folders using the windows explorer gui. Now some of my powershell scripts broke. I don't want to resort to hard-coding paths, unless I have to, and then, only as a temp…
Bewc
  • 431
  • 5
  • 15