Windows 10 How to change default "Download" & "My Documents" folders from commandline + Registry?

tobwen

Active Member
How can I let Windows how the current default "Downloads" and "My Documents" folders from COMMAND LINE?

How can I change from COMMAND LINE the default "Downloads" and "My Documents" folders to lets say "D:\myspecial\"?

How can I change directly in Registry the default "Downloads" and "My Documents" folders?
 
The power shell command to rename is rename-Item -path ”folder path" -newname "the name you want" -Force

I don’t know the logic of changing the desktop and my documents folder though.

I don’t actually know if powershell has an inbuilt safety against the renaming.

if you rename desktop some features may be removed, for example when you install programs and it says “Add to desktop” you will likely be unable to use that feature. In the case of my documents I know some games use it as storage, you’d potentially also say goodbye to all of those.

mirroring the folder to another is possible, so that the changes are reflected though.

Let me know if the command works, I’m curious. Though i wouldn’t use it myself out of a VM and I’m a bit too lazy right now to open one up.

I believe you can also go into the properties of the folder, location, then change the path.

Hope that helps!
 
The power shell command to rename is rename-Item -path ”folder path" -newname "the name you want" -Force

I don’t know the logic of changing the desktop and my documents folder though.

I don’t actually know if powershell has an inbuilt safety against the renaming.

if you rename desktop some features may be removed, for example when you install programs and it says “Add to desktop” you will likely be unable to use that feature. In the case of my documents I know some games use it as storage, you’d potentially also say goodbye to all of those.

mirroring the folder to another is possible, so that the changes are reflected though.

Let me know if the command works, I’m curious. Though i wouldn’t use it myself out of a VM and I’m a bit too lazy right now to open one up.

I believe you can also go into the properties of the folder, location, then change the path.

Hope that helps!
The original poster didn't ask if it is possible and how to rename a predefined folder, but how to change the registry defaults to different folders, by using a command at the command prompt level. I do not know if this is possible and I also don't understand why would anyone want to do this, this way. But, if possible, it won't affect windows functioning. I also did this by using the windows built-in tools and everything works fine.

Sent from my SM-N975F using Tapatalk
 
The original poster didn't ask if it is possible and how to rename a predefined folder, but how to change the registry defaults to different folders, by using a command at the command prompt level. I do not know if this is possible and I also don't understand why would anyone want to do this, this way. But, if possible, it won't affect windows functioning. I also did this by using the windows built-in tools and everything works fine.

Sent from my SM-N975F using Tapatalk
Oh thats an interesting idea. I also get what you meant, I typed meaning that I didn't know if changing the folder would automatically change the path already inputted into any game you're using or even the operating system. I can see renaming "My Documents" to "Mi Documents" would have games or installed programs still looking for "My Documents" instead of the updated name, thus losing functions of that program. I also couldn't easily test it as I was not at my computer.

For cmd:

you'd need to use reg add with the /f to overwrite it and also change the long word from hkey local.... etc... to HKCU,HKLM... etc. you can do reg add /? to see details on the command.

HKCU/rest/of/the/path /t REG_SZ /v value /d data you want change /f (to force the change)

reg_sz being a string, it could be another type like a multistring. I'll link the microsoft docs on reg add.

the path for some of the folder options would be:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

i believe this should be potentially repeatable with group policy as well through the windows components section.

go onto regedit and follow the path to do it directly in regedit instead of cmd.

Other than that i'm admittedly not certain, still i hope it helps :)

if not, what do you specifically want command line to do for you here? Op you mention changing the defaults, the default whats?
 
Last edited:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Thats the key information. Thank you.

Further investigations show that there is a related Registry branch

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

for "public shell folders". Whats means "public"?

Does it mean default when a corresponding user shell folder is not present?

Which one has priority when they are different?

BTW: Is a reboot required when I change the shell folders?
 
Thats the key information. Thank you.

Further investigations show that there is a related Registry branch

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

for "public shell folders". Whats means "public"?

Does it mean default when a corresponding user shell folder is not present?

Which one has priority when they are different?

BTW: Is a reboot required when I change the shell folders?
Public means that all the users that have access to the computer will be able to access all the files stored under the public folder. Or, if you put it in other words, public means shared to all users with access to a computer. Of course, we are talking only about local files stored on that computer.

Sent from my SM-N975F using Tapatalk
 
Thats the key information. Thank you.

Further investigations show that there is a related Registry branch

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

for "public shell folders". Whats means "public"?

Does it mean default when a corresponding user shell folder is not present?

Which one has priority when they are different?

BTW: Is a reboot required when I change the shell folders?
Default is more about unchanged settings in general. The basic stuff every operating system comes with, unchanged.

non default would be changing any value at all in the registry to something else, thus not having the default registry coming with the operating system. Default in this case would be the default settings eg “true” vs a change to “false”

registry priority works like a tree, so in the case of the guide:

Software loading first, Microsoft, windows, current version, explorer,shellfolders, then subkeys and values in that folder. As for which subkeys/values load first… Not certain, I’m gonna say it’s probably just in a top to bottom format? I can’t answer that one I’m afraid. Someone else might be able to help you there? You can also set priorities on cpu usage for something like programs, though I’ve never done it personally.

You said it’s not present, so when you go to regedit following that path you don’t see shell folders or it’s subkeys? Are you just trying to add those?

Is this to manually remake registry keys that are missing?
 
Back
Top