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: User Folders - Moving User Folders by Modular Script

User Folders - Moving User Folders by Modular Script

Choose the folders to move,their destination,and just run the script
Published by Pepito
11 Oct 2010
Published by

Hi All,

This script was initially made in French by Alain Quarré, the author.
I found it,lot of people too, very convenient and easy to handle
so I asked the author for an english version,he kindly accepted to do
the changes and agreed that I post it in this forum
You can read his original post at Déplacer Mes Documents par défaut et par script : Personnalisation de Windows (in french)
All credits and thanks goes to him of course !

WARNING : This script don't apply any changes to the CURRENT USER !!
but only for the next ( and other created account(during activation)
This script is totally free,you can copy,modify and publish it
But using it will be at your own risks (there is none so far )

TIP : Best use of this script will be on a new or re-install of Seven

1) During install and when prompted to, choose a fake user name i.e. "test"
2) When Seven is first launched and ready,run the script ( NECESSARILY with administrator rights)
3) create a new user account with the good name this time,open a session with it and see that the folders you
defined are at the right place with the good and only junctions
4) "Test" account can, now be deleted !
That' all...Folks

How to make so that the users files are where one wants :

Lot of tutorials on the Net will show you how to move the files My Documents, My Images, Downloads, My Vidéos,…
Nevertheless, the most explained method (right click, properties, new placement,…) brings a problem.
This problem is related to the Junctions created at the time of the activation of the user account.
The junctions are there to redirect the writings on, for example, My documents If you move My Documents by right click, properties,...
My Documents will be,indeed, at the new place. But, in the User Folder, there will be always a junction " My Documents "
which will always point to the old place.

Move your files My Documents, then, note the state of the junctions
to verify, in a prompt command, type :
dir "%userprofile%" /AL
the junction still point to the original place
To be sure,in same window type :
dir c:>"%userprofile%\Mes Documents\test.txt"
Look for test.txt, you will find him in old folder: C:\Users\%username%\Documents

very annoying,not to forget,that all moves must be done manually for all users
actual and to come

This script modify the "Default User" settings,as "Default User" is the model for new users
the changes are made in Seven in this folder : C:\Users\Default\NTUSER.DAT

After running the script,every new user will have his folders at the choosen place
and on first connexion, an other script ( automated ) will create the new junctions
that will point,this time,to the right place

the script to run is : PositionDefaultFolderSevenModular.cmd, necessarily with ADMINISTRATOR's RIGHTS !
The default choosen folder place is : D:\Documents\
If this place suits you than just hit Enter and let the script finish
To choose a specific folder place, you must edit the PositionDefaultFolderSevenModular.ini
the script will test the destination to match, before running !

Modular Script :
Modularity on :
the folders to move
The destination
If needed sub-folder per user or not
If needed to hide the destination folder

This script can move these folders :

My Documents
My Pictures
My Vidéos
My Music
Saved Games
Temporary Internet Files
CD Burning

In order to custom the script, you have to edit the PositionDefaultFolderSevenModular.ini
This is the original one :

My Documents*Personal*AddUserName*Security*Documents*D:\Documents
My Pictures*My Pictures*AddUserName*Security*Pictures*D:\Documents
My Videos*My Video*AddUserName*Security*Videos*D:\Documents
My Music*My Music*AddUserName*Security*Music*D:\Documents
Saved Games*{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}*AddUserName*Security*Saved Games*D:\Documents
Temporary Internet Files*Cache*AddUserName*Security*Temporary Internet Files*D:\CacheFolder
CD Burning*CD Burning*NoUserName*NoSecurity*Burn*D:\CacheFolder\Burn
Every line is specific of the folder to move
Every line contains 7 fields separated by *

Local name
Registry Value Name
AddUserName or NoUserName
Security or NoSecurity (Not used)
Sub-Folder Name
Move-to Position (NO BACKSLASH @end)
(Optional) "Hide-Sys" The moved folder will be system and therefore hidden

Only fields 3, 4, 6, 7 can be customized
Place the sign " smaller than " (<) at the beginning of the lines of the folder that you do not wish to move.


Downloads :

03 Jul 2011   #1

Windows 7 Home premium x64

I'm using this script about 7 months now and it works great.. Thank you!!!

However it seems to create a strange error in add/remove locations in a library folder... The default folder of documents in my example is referred that it is "not responding" (in add/remove folders in library dialog). However I can access this folder from the library and cannot find where the error is referred to.

If I remove the folder end add again manually the error message disappears. NO VISIBLE ERROR at all. And NO problems with personal folders It is working like it is meant to work with last ones.

Edit: Added picture (sorry for Greek... I own home premium... cannot change language).

At the top says library locations. In the bottom is common videos folder and at the left of the same folder says "not responding" but I cannot understand the real problem. The folder is accesible....

Attached Images
User Folders - Moving User Folders by Modular Script-library-locations.png 
My System SpecsSystem Spec
30 Jan 2012   #2

Win7 Ult x64

@Pepito Thanks for translating the initial post from French!

They have been changes made as noted in the French language thread:

Most importantly, the French only and Multilingual versions of the script are no longer being updated.

The "ML-S" version is the only that is being updated. The latest at time of this post is ver 4.3 (2011-07-27).

Google translation
Multilanguage version with security management files:
Here is the version incorporating the safety of the destination folders.
Future changes will only be made to this version.
By default, all files moved, except My Music, are inaccessible to other users not administrators
Here's a Google translation is what is posted concerning the version changes.
NOTE: I've enlcosed in brackets "[]" my edits of the translation.
[Change] 29/11/2010
Integration of security management files.
By default, user folders are only accessible by the user himself and the members of the Administrators group.
[When you only move a user's folders] security is being inherited from the destination folder.
[Then you have the problem] that all users have full rights to all files ...
With the script, the [security and permissions] will be the same as the original locations.

PositionDefaultFolderSevenModular.ini file, if the field is AddUsername 3 AND 4 is the field Security,
the following security settings are applied to the relevant files:
  • Applications of all rights to the user. (+ Inheritance)
  • Remove inherited rights
  • Applications of all rights to the account system (+ inheritance)
  • Applications of all rights to the Administrators group
Note: By default, and as for junctions, Windows does not apply to files moved the original security.
[But] the script now does!

[Change] 27/07/2011
Changing the script Jonctions.cmd
Added variable %USERDOMAIN% for the application of safety issues.
The absence of this variable was a problem of access to the Temporary Internet Files folder to a user domain.
See the script jonctions.cmd on line 156
In addition, the following Version History can be found in the "INFO.txt" (French), dated 2011-07-27, contained with the latest "ML-S" rar. Here's the Google translation:
News release:
V1 in November 2007. Script for XP
V2 in January 2010. Seven script - Vista
V3 in March 2010. Complete modularity for Seven Script - Vista
V4.0 October 2010. Change language to manage multi
V4.0.1 Added a test that the script can not run from a moving target folders
V4.1.beta Added security management files. Full rights for System and% username%. November 22, 2010
V4.1.1.beta Added security management files. Full right to the Administrators group. November 23, 2010
V4.2 Added folder for virtual machines. May 28, 2011
V4.3 Added the %USERDOMAIN% in the implementation of security on file by the script Jonctions.cmd
Currently there are 30 pages in that thread with lots of very good information.

There is one thing that is not done by this modular script that might be important: moving the Public folder.

Fortunately, Alain has another script that handles that. The link to the French thread is listed in the INFO.txt file contained in the rar.
Here's a Google translation:
Information about this script:

To ensure the smooth running of this script,
it is advisable to restart your PC and run this script directly in administrator mode.

After running this script, the connections to the public folder in the library to be built to date.
(only for users already on the PC. The future users will have their libraries correct)

The script:
- Changes the position of the Public folder in the registry.
- Move the contents of the public.
- Created the junction points ensuring the proper monitoring records to the new location
- Close the session
My System SpecsSystem Spec

 User Folders - Moving User Folders by Modular Script

Thread Tools

Similar help and support threads
Thread Forum
powershell script to create user folders and set permissions
Wondering if anyone in this forum can help me figure out what I am doing wrong with my script. I am grabbing a text file with a list of users in it. I want to then create folders for all those people and then set explicit permissions on those folders to only allow the users and admin access to it....
Moving User Folders - additional folders appear
I have just done a clean install of Win 7 Pro 64. I have set up four accounts and for each one I have moved the user folders to a separate hard drive by using the Right Click Properties > Location > Move. I have done this for the following folders: - Desktop - Downloads - My Documents -...
Moving user folders; User picture error
Hi all, I am trying to move my users, and all future users folders (i.e. documents, desktop, appdata etc) from my SSD to a regular HD. I followed a few tutorials and moved each folder by right clicking it and clicking the "Move" button on the location tab After that, I editted the keys...
Moving user folders
Hi guys I moved the location of my user folders (docs,music,pics etc) to D drive but i have other folders i created myself in there which i also want to relocate but there is no location tab in properties.I can cut and paste these to D: but i would like to leave a link folder in the users...
Moving user folders
Hi , Well I've moverd my user folders (music,pictures,videos,docs,DLs) to a different partition using Yamicsoft's 7 manager. All folders kept their original icon except My Downloads and My Documents. I tried to customize them but I didn't find the folder icon of neither of them in...

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 01:50.
Twitter Facebook