Moving "Special Folders" and the USERPROFILE variable


  1. Posts : 14
    Windows 7 Professional
       #1

    Moving "Special Folders" and the USERPROFILE variable


    On a laptop running Windows 10 Home I tried moving the special folder "Videos" to another location, by clicking on the folder's Location tab in Properties, and using the Move button. It appeared to work fine, but I noticed one odd thing: Before the relocation, if I typed the following at a command prompt:

    cd %USERPROFILE%\Videos

    Explorer would open to the Videos folder. If I run the same command now, it tells me "the system cannot find the path specified." Of course this is because %USERPROFILE% still points to its original location under C:\Users\[username].

    1. Is this behavior involving the environment variable normal?

    2. If so, how do programs know where to store videos if Windows can't find %USERPROFILE%\Videos?

    Background: I'm trying to figure this out because I'm trying to diagnose a problem on a desktop machine which I just upgraded from Win 7 Pro to Win 10 Pro. I am seeing duplicate special folders under my username. I assume this has something to do with the fact that in the past I had relocated them to a different drive. I know I could try to get rid of the duplicates by restoring them to their default location and then moving them again, but first I want to understand what's going on with the environment variables.

    Thanks!
      My Computer


  2. Posts : 14
    Windows 7 Professional
    Thread Starter
       #2

    FOLLOW-UP: I see that the values stored in:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

    indicate the new locations of special folders after I move them. Is this the (only?) way Windows knows, for example, where "My Video" is located? How would one get to it from a command line?

    What's weird is that on my desktop machine I have two "Documents" folders under my username, each of which has a Location tab, even though only the "moved" folder is listed here in the registry. Why does windows think the folder in its original location is a "special folder?"

    General question: Once you move a special folder to a new location (using the Move button) shouldn't the folder no longer exist at it's original location? Or does Windows keep around a hidden copy for some compatibility reason?
      My Computer


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

    Take a read on this: CLSID Key (GUID) Shortcuts List for Windows 10

    and the related tutorials

    Complete List of Windows 10 Shell Commands
    Complete List of Environment Variables in Windows 10

    I ran into similar issues when I did what you did, tried the Win10 save location in Settings ... but eventually decided to just move my entire profile to a different partition.
    See: User Profile - Change Default Location - Windows 7 Help Forums

    When you're done, double check the environment variables
    Command Prompt
    set
    REM if things look good, then
    REM exit
      My Computer


  4. Posts : 14
    Windows 7 Professional
    Thread Starter
       #4

    Thanks. I think I've resolved it. I switched all the special folders back to their default locations, and then switched them back to the location where I want them on another drive. (I temporarily emptied them all first so the moves would be instantaneous.) Now I see only one of each kind of special folder.

    And the CLSID Key (GUID) shortcuts all seem to work: if I create a new shortcut using each of those keys, it opens the correct folder. So I think I'm good to go.

      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 18:55.
Find Us




Windows 10 Forums