Improper resolution of Documents folder?


  1. Posts : 131
    Windows 10 Pro 64-bit
       #1

    Improper resolution of Documents folder?


    I have used the Location tab on the Documents folder to move my folder to 'J:\Documents'.

    Improper resolution of Documents folder?-docfolder.png


    In the registry I see these two keys:


    Code:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
    "Personal"="J:\\Documents"
    
    
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
    "Personal"=hex(2):4a,00,3a,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,\
      74,00,73,00,00,00
    However, when I use the expression %USERPROFILE%\Documents it always expands incorrectly:


    Code:
    Microsoft Windows [Version 10.0.10586]
    (c) 2015 Microsoft Corporation. All rights reserved.
    
    
    C:\WINDOWS\system32>cd %USERPROFILE%\Documents
    
    
    C:\Users\Jim\Documents>
    What could I be doing wrong?

    I suppose the resolution of %USERPROFILE% is fixed and not context-sensitive, so how should this be expressed for a shell file?
      My Computer


  2. Posts : 12,799
    Windows 11 Pro
       #2

    There could be a couple of reasons.

    When you move your Documents folder to another Drive, you are presented with a Popup window that asks if you want to move the contents. If you don't select yes, you can end up with your Documents in both places.

    There is a hidden documents folder which cannot be oved as it is basically a pointer. It holds no documents, it only points to where your documents actually are. Many programs use your documents folder by default. If you move them from the default location, something has to tell them where they are now.

    In the same vein, there are a very few programs which are coded to put their files in C:\Users\Username]Documents. If you have moved them, the program will create a Documents folder in C:\Users.

    If you will go to File Explorer and right click the Documents folder and select properties, it will tell you where your documents actually are. As you can see, mine are on my E drive.

    Improper resolution of Documents folder?-z.png
      My Computer


  3. Posts : 131
    Windows 10 Pro 64-bit
    Thread Starter
       #3

    essenbe said:
    There could be a couple of reasons.

    When you move your Documents folder to another Drive, you are presented with a Popup window that asks if you want to move the contents. If you don't select yes, you can end up with your Documents in both places.
    ...
    Mine are on the J drive.

    Improper resolution of Documents folder?-docs.png

    I did a full move of all the files when I made my user folder (probably on Windows 7). I have updated in-place from 7 to 8 to 8.1 to 10.

    Several of my programs installs made folders on the fixed location 'C:\Users\Jim\Documents'.

    So I do have some stuff there, but most stuff in the proper location.

    However, that does not answer my question about the expansion of the Userprofiles nor how to programs actually locate the correct place.

    This all seems very sloppy to me.

    I guess I am basically asking how does one programmatically find a user 'Documents' folder?

    By the way, 'shell:Personal' resolves properly.
    Last edited by arachnaut; 29 Jun 2016 at 16:54.
      My Computer


  4. Posts : 131
    Windows 10 Pro 64-bit
    Thread Starter
       #4

    I decided to create a junction in C:\Users\Jim called Documents and pointed it to the true location.
    Things seem to be OK now.
      My Computer


  5. Posts : 3,502
    Win_8.1-Pro, Win_10.1607-Pro, Mint_17.3
       #5

    arachnaut said:
    I decided to create a junction in C:\Users\Jim called Documents and pointed it to the true location.
    Things seem to be OK now.
    Previous versions used to do that for you when you moved the folder(s) through properties > location.

    Windows 10 has implemented a new method of moving the special User folders in Settings > Save locations. This change seems to have affected the properties > location method in that the junction is no longer created.

    essenbe alluded to the junction in his post and you created one manually so the issue is resolved. I don't know if I would characterize this as a bug though - probably.

    I've been on too many versions of Win10 to be absolutely certain the above is factual, but I noticed the same behavior on my machines when I did a Clean install (therefore, no junctions were carried over from an upgrade)

    Good troubleshooting arachnaut.
    Last edited by Slartybart; 30 Jun 2016 at 22:41.
      My Computer


  6. Posts : 131
    Windows 10 Pro 64-bit
    Thread Starter
       #6

    Well, it's also possible that some of my older XP-era programs were problemmatic because they manually created the user folders without checking things properly. So when the folder is in the User area maybe the junction won't be made.

    I moved everything out of the User folders, deleted the User folders, then made the junction to the 'location'.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:41.
Find Us




Windows 10 Forums