Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Script to change the location of Documents folder in Windows 7

03 Aug 2014   #1
Medyo

Windows 7
 
 
Script to change the location of Documents folder in Windows 7

Hi! I currently inherited a Windows 7 image that has the default location for the users' My Documents folder configured incorrectly. When a domain or local user account logs in to the machine for the first time the Documents directory, which by default should be located on %userprofile%\Documents and C:\Users\Public, is being set to point to the "My Documents" SHORTCUT folder and not the actual Documents folder inside C:\Users\%username%\. See screenshot.

I'd like to fix this by running a script that will remove both directories and only specify C:\Users\%username%\Documents as the only and default My Documents directory for the user.

Unfortunately, doing this via Group Policy is not an option. And since the image I am using was created by a previous technician I couldn't just create a new image since there are tons of software and customization already incorporated on it. I also tried exporting and importing the registry key for it on the explorer shell but that only seemed to work for the user where I exported the key from.

It would be nice if I have a more permanent fix for it so any new user logging in would have the correct path already set instead of me running a script for every user to fix it but if there's a simply and quick script to do it I can live with that.




Attached Images
Script to change the location of Documents folder in Windows 7-documents_old.jpg Script to change the location of Documents folder in Windows 7-documents_new.jpg 
My System SpecsSystem Spec
.
04 Aug 2014   #2
JDobbsy1987

Windows 8.1 Pro x64
 
 

Hi Medyo,

Take a look at these guides to see if they do what you are trying to achieve.

Regards,
Jamie
My System SpecsSystem Spec
Reply

 Script to change the location of Documents folder in Windows 7




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Why User folder shows My Documents but folder location is Documents?
Q1. When I look at the folders in C:\Users\User-Name , I can see a folder. I double click on and the location now is C:\Users\User-Name\Documents , why is the folder name different from the exact folder location? (I notice all other folders that have the word "My" has the same situation) Q2....
General Discussion
Want to change location of My Documents and My Music to secondary HDD
Being a procrastinator I have of course waited until the last minute to switch from my Win XP system to my Win 7 Home Premium system.:( I built the Win 7 system using a 256 GB SSD as the system/program drive and a secondary 500 GB HDD for data, backups, etc. On my XP system I have a ton of...
General Discussion
How to change dfault location of --MY DOCUMENTS
Have just installed win 7 Prof upgrade. I have read the---how to change the default location of user folders in win 7 and win8. The problem with this and other ways always come down to a tab called --LOCATION--. I have only five tabs in properties on my documents folder (that I want to move MY...
General Discussion
Please help me with my documents folder location -URGENT
Fallas, It might be a quick easy fix for your but I am lost as I am new user to Win7.please help me as urgent. I have already read the folder location forum and tutorial here but cant find answer to my problem. Situation: I moved "Documents" folder to D:/ root with out realising that I...
General Discussion
Change Location of My Documents
I'd like to change the location of My Documents, but they've removed the location tab that was present in Vista. What I'm looking to do is set the location of My Documents to E: (Western Digital 1TB My Book) as opposed to C: (Primary 150GB Hard-Drive) because of the much needed storage space. ...
Customization
My Documents/Pictures/Video Location Change
I have a new laptop, a Dell Precision M4400. The first thing I did was a format and a clean install with Windows 7 Ultimate. So far, so good, and it certainly seems to be an improvement over XP. Being an oldtimer, I like to partition the hard drive and put all of the data folders onto the D:...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:26.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App