My Documents Folder - Path different to folder name

1

In Windows 7 I had moved My Documents to My D:\ drive and called it "Docs". I have since added other folders (for my wife and kids) so have renamed it with my name "Ciaran"

In both Windows 7 and Windows 10, the display folder name was "Ciaran" but the path is D:\Docs when I look in the address bar of Windows Explorer.

How do I change the folder path to Ciaran i.e. D:\Ciaran?

Interestingly if I rename it to Ciaran1 the path becomes D:\Ciaran1 but reverts to D:\Docs if I rename it back to Docs. This is incorrect - even when renaming the folder the path remains D:\Docs but the desktop.ini for the folder changes the LocalizedResourceName to Ciaran1

Presumably it is some registry setting but not sure where to look and it could take a while to find it.

PowerShell:

PS D:\> ls

    Directory: D:\

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       05/07/2019     17:18                Folder1
d-r---       14/01/2020     23:42                Docs
d-----       13/12/2019     23:18                Folder2
d-----       08/10/2019     08:53                Folder3
da----       25/10/2019     16:33                Folder4

D:\ desktop.ini


[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
IconResource=%SystemRoot%\system32\imageres.dll,-112
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235

desktop.ini for D:\Docs aka D:\Ciaran

[.ShellClassInfo]
LocalizedResourceName=Ciaran
IconResource=C:\Windows\System32\SHELL32.dll,4
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235

Ciaran Martin

Posted 2020-01-15T08:37:04.750

Reputation: 111

Please be aware that Windows 10v1809 had a terrible bug where redirected folders were deleted on upgrade. While Microsoft is unlikely to repeat that specific blunder, make doubly sure that you have a regular backup plan of important files. https://redmondmag.com/articles/2018/10/09/microsoft-lost-files-issue-windows-10.aspx

– Christopher Hostage – 2020-01-16T00:35:34.787

1@ChristopherHostage The issue you speak of has zero to do with the OP's question and does not apply. The issue in that article is specific to the first public build version of the v1809 update only and it only affected a minute amount of users who took the v1809 update when it was first offered, which Microsoft pulled from the update servers within a short time after it became available (v1809 was delayed for weeks afterwards) and the v1809 build version that resulted with this bug is no longer publicly available (this is not what the OP is experiencing). – JW0914 – 2020-01-17T12:20:02.313

Answers

0

Windows doesn't support hot-swapping user data directories in this way.

To do so:

  • Right-click on directory (D:\Docs) > Properties > Location Tab > New path (D:\Ciaran) > OK
    • If D:\Docs properties does not have a Location tab, then you'll need to perform the above procedure on the %UserProfile%\Documents directory.

JW0914

Posted 2020-01-15T08:37:04.750

Reputation: 2 135

-1

Things can get confusing because the user folders that appear under This PC can have display names different than their filesystem names. The most relible way to determine true filesytem names is PowerShell or a Command Prompt.

The display name is supplied by the contents of the desktop.ini file. Normally, it references language-specific folder names:


[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
IconResource=%SystemRoot%\system32\imageres.dll,-112
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235

But remaming can yield:

[.ShellClassInfo]
LocalizedResourceName=Renamed Folder
...

desktop.ini files normally have both Hidden & Sytem attributes set, so Explorer view settings must be set to both Show Hidden Files... and not Hide Protected OS Files.

If you need more help untangling, post a screenshot of D:\ from both PowerShell & Explorer.

Keith Miller

Posted 2020-01-15T08:37:04.750

Reputation: 1 789

I've updated my answer with the screenshots. However the obvious solution is starig us in the face - create a new folder called Ciaran and copy the files across - worked a treat. But it would still be interesting as to what the underlying solution is. – Ciaran Martin – 2020-01-15T21:52:29.863

Yes, renaming only affects the display name. But if you use Move from the Location tab, you can create a file folder with the desired name and move the folder to that location. – Keith Miller – 2020-01-16T04:17:11.260

This is overcomplicating an extraordinarily simple issue... simply navigate to the Documents folder Windows is currently set to use, right-click on it > Properties > Location tab. – JW0914 – 2020-01-17T12:22:43.027

JW0914: That's what I told him to do once I had verified the circumstances. The OP was attempting a rename & not getting desired results. I explained the probable cause & requested more info. If you looked at the question in its original form, you would understand my answer. – Keith Miller – 2020-01-17T14:35:52.473

@KeithMiller The desktop.ini has no purpose/bearing in this context. User data directories are hardcoded into the registry, which is one reason why the correct way of performing a target change should be used (directories' Properties > Location tab). All of my user data directories are stored on a separate partition, and not a single one has anything referencing this change in the desktop.ini, as the file has no bearing in this context. You're talking about having the directory appear with a different name without a target change in your answer, which is not the OP's issue. – JW0914 – 2020-01-17T15:02:35.683

You are mistaken. Desktop.ini was responsible for the name change the OP inquired about. – Keith Miller – 2020-01-17T15:05:08.630

@KeithMiller That's factually inaccurate. To verify, please test it yourself: Right-click on a user data directory in %UserProfile% > Properties > Location Tab > move to a custom path > open directory's desktop.ini. If that doesn't convince, delete desktop.ini once the directory has been moved, refresh Explorer [F5], and if what you say is correct, directory should default back to its non-customized target state (which will not occur, as the desktop.ini has no bearing at all on customized targets for user data directories). OP has an issue with the path, not the directory name – JW0914 – 2020-01-17T15:14:00.780

But the situation you describe was not the OP's! The OP couldn't understand why, after an attempted rename, the display name would change but not the source folder name. It's difficult to explain that without mentoning the desktop.ini file. – Keith Miller – 2020-01-17T15:18:29.107

Let us continue this discussion in chat.

– JW0914 – 2020-01-17T15:18:58.863

@KeithMiller Please refer to the 3rd and 4th sentences in the OP's question, which should thoroughly clear this up: _"In both Windows 7 and Windows 10, the display folder name was Ciaran but the path is D:\Docs when I look in the address bar of Windows Explorer.

How do I change the folder path to Ciaran i.e. D:\Ciaran?_ – JW0914 – 2020-01-17T15:21:04.010

No. I'm low vision & the chat page doesn't zoom well. I understand this better than you. I'm a former MS MVP Shell/User. You need to examine the behavior of the Rename command when the folder being renamed has a LocalizedResourceName supplied by a desktop.ini file. – Keith Miller – 2020-01-17T15:31:17.727

@KeithMiller Best of luck =] – JW0914 – 2020-01-17T15:50:25.520

-1

The solution all be it a slight workaround was to create a new folder called Ciaran and copy the files across.

Ciaran Martin

Posted 2020-01-15T08:37:04.750

Reputation: 111

Is there a reason why you're not using the built-in option to do this via the document folder properties' location tab? I'm perplexed why you appear to be trying to find a "workaround", rather than using the feature that is there to do what you want to do. – JW0914 – 2020-01-17T12:23:52.610