Transferring user folders. How to move user folders to another local drive in Windows? Transfer user data to another drive

But I think it’s very useful, so I’m posting it corrected and expanded copy.

The task of transferring a user profile folder from a system drive to another logical or physical drive in a Windows operating system is very urgent for a number of reasons:

  • The need to separate operational information (system) and archive data (user data) is caused, for example, by the need to store system files on a high-speed but less reliable RAID0 disk array.
  • There is no need for additional information transfer when reinstalling the OS.
  • Compared to transferring an individual user profile, transferring the Users folder is more preferable, since the profiles of all subsequent users of the computer will also be saved in the right place, and there will be no need to go through the transfer procedure again.
One of the most elegant and efficient methods for carrying out such a transfer is the ability to determine the location of the user profiles folder during the system installation stage. Microsoft provides us with this opportunity for Windows 7 under the name Audit Mode. You can read more about this mode in the next article.

Now about the actual scenario for transferring the Users folder:

  1. You should perform a normal installation of Windows 7 in any way convenient for you, stopping at the step where the installer program will ask you to enter the computer name and user name.
  2. At the screen for entering your computer name and username, press CTRL + SHIFT + F3. The computer will restart and boot into Audit Mode. In this case, the system will be in this mode until you run the sysprep utility with the /oobe switch or select the appropriate item in the windowed version of this utility, which starts in Audit Mode every time the system starts.

  3. Since at this point you will already have Windows 7 installed, but not fully configured, before assigning a new location for the user profiles folder, you must first prepare the disk subsystem, that is, create and format the partition that you plan to use to house the Users folder .
  4. Now you need to create a configuration file to configure the location of the Users folder, here are its contents:

    x86 version (download):
    D:\Users D:\ProgramData
    Version for x64 (download):
    D:\Users D:\ProgramData
    Save it under any name, for example unattend.xml.

    Attention! The file must be saved in UTF-8 encoding (and for those who understand UTF8 + BOM).

  5. The window with the title "System Preparation Program 3.14" must be closed. Otherwise, when you run the following command, you will receive the error: “Another copy of this application is already running.”

    It is better to save the "unattend.xml" file on your hard drive rather than on a flash drive, because when using this file, the next time you reboot, the flash drive will not yet be connected and the system will report an error and will constantly reboot. The entire installation process will have to start over. Assuming that the unattend.xml file has been saved in the root of the C drive, then the command to apply it will be as follows:

    C:\Windows\System32\sysprep\sysprep.exe /oobe /reboot /unattend:C:\unattend.xml


    The computer will restart.

    If the file is NOT saved in UTF-8 encoding (as described above), you will receive the following error: “A fatal error occurred while running the Sysprep program on the computer.”

  6. Returning to the window for setting the computer name and user name, complete the installation.
  7. After booting the computer, make sure that the D:\Users and D:\ProgramData folders exist and that the folder of the user whose name you specified at the final installation stage is in D:\Users.

As a bonus, you can also take advantage of the so-called junction points to prevent errors associated with explicitly specifying the previous paths of user profile folders. To do this, create two symbolic links using the mklink utility (run with administrator rights):

Mklink /J C:\Users D:\Users mklink /J C:\ProgramData D:\ProgramData
Thus, now, even when accessing the same paths, any program will not notice the substitution and will work with folders on drive C, although in fact they will be located in the location you configured.

To make some applications compatible with Windows XP, I recommend making the following symbolic link:
mklink /J "C:\Documents and Settings" D:\Users
If the users folder already existed and you set the same user name during the initial setup of the operating system, then another folder for the profile will be created, and the old one will remain untouched. All files from the old folder should be transferred to the new one manually (it is advisable to boot under a completely different user so that files in the profile folder are not blocked).


Therefore, I recommend that after installing Windows and after creating user profiles (for this you need to log in interactively once as each user), create a system image on the C: drive. In the event of a failure, you deploy the system from an image in which user profiles are linked to their folders, and the problem described in the paragraph above will not occur.

Transferring user profile folders from a system drive to another drive is needed to free up a relatively small system drive (for example, an SSD).
The operation is unsafe and controversial - anyone who doesn’t know how and why should not do it.

Additional will be required. xxcopy utility. Pro version required. Although it is paid, its official trial period of 60 days is quite sufficient for our task.
So:

  1. Install xxcopy.
  2. We create a new temporary user with a name, for example, “TU”, which will be used to perform the data transfer operation and give him administrator rights.
  3. We reboot (to remove locks on used files) and log in under the new user (“TU”).
  4. Launch the Windows command line in administrator mode. To copy a folder from drive C: to drive D:, run the command:
    xxcopy c:\Users d:\Users /E /H /K /SC /oE1
    If your drive letters are different, substitute yours. As a result, the folder will be copied properly. You don’t have to pay much attention to errors, if there are any.
  5. Next we run the command regedit.In it we find the registry branch HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.In this branch we change the values ​​of the keys:
    • Default to "D:\Users\Default"
    • ProfilesDirectory to "D:\Users"
    • Public to "D:\Users\Public"
  6. In the same branch there are branches with the parameters of the profiles of users already registered in the system (the branches with long names are what they are) - for each user you need to change the value of the key " ProfileImagePath» to a directory on the portable disk.
  7. The temporary user is no longer needed - everything that was required of him has been completed. At the same time, nothing irreversible has been done so far - all the data was actually copied and not transferred. Therefore, in the case of “something went wrong...” you can always return the status quo. Now we reboot again and log in under a real administrator account.
  8. We make sure that the login occurs correctly and the system boots without any questions. Now you can proceed to further steps.
  9. Launch the Windows command line again in administrator mode and run the commands:
    • rd "C:\Documents and Settings"- removing the symbolic link to the old Users folder
    • rd "C:\Users" /S- deleting the oldest Users folder
    • mklink /D "C:\Documents and Settings" "D:\Users"
    • mklink /D "C:\Users" "D:\Users"

Now in your system the Users user profile folder is on the desired drive and, in addition, there are symbolic links to the new folder that protect the system from incorrect access to the old address.

In order to transfer user data and settings from one computer to another, you can use various paid programs, but why, if there is a built-in Windows solution - Windows Easy Transfer. It’s worth noting right away that this tool is already built into Windows7 and Windows8, for Windows XP and Windows Vista, you need to install it in order to transfer files and settings to Winsdows 7 here link to distribution . The installation procedure is very simple and boils down to a few clicks of the next button and acceptance of the license agreement. This tool must be installed both on the computer from which the profile is copied and to which the profile is copied.

Using Windows Easy Transfer, you can transfer a profile regardless of the version of Windows (Home Basic, Professional...), but there are limitations:

Windows Easy Transfer does not move files from 64-bit Windows to 32-bit Windows.

Data Transfer Tool Windows doesn't move programs, only user settings and files.

In order to launch Data Transfer Tool (Windows Easy Transfer) you must:

In Windows XP, Windows Vista, after installation, go "Start" - "All Programs" - "Windows Easy Transfer";

Login to Windows 7 "Start" - "All Programs" - "Accessories" - "System Tools" - "Windows Easy Transfer";

In Windows 8, enter in the search bar Data transfer tool.

The Windows Easy Transfer window opens. Click " Further".

After this, a window for selecting a profile transfer method will open.

Easy Transfer Cable. This is a special cable with USB connectors that can be purchased from hardware vendors. One end of the cable is connected to the source computer, the other to the destination computer. Both computers must be turned on during the data transfer and must be running Windows Easy Transfer. Using this method, you can only transfer side-by-side data.
Net. To perform a network transfer, you need two computers running Windows Easy Transfer and connected to the same network. Both computers must be turned on during the data transfer. In this way, you can only transfer side-by-side data. When transferring data over a network, a password is specified on the source computer, which must then be entered on the destination computer.
External drive or USB flash memory device. It is possible to connect an external hard drive or USB flash device, you can also use an internal hard drive or a shared folder on the network. In this way, you can perform both side-by-side and wipe-and-restore migrations. Your data is protected by entering a password on the source computer, which you then need to enter before importing the data on the destination computer.

In this example I will use a USB flash drive, so I choose- External hard drive or USB flash device.


After that, select the account whose profile you want to move. If you press " Settings"You can add or remove files and folders to transfer to another computer.


Then you need to enter a password to protect your profile.

The next step is to choose where we will save the profile, in this case it will be a USB flash drive. Please note that the USB flash drive must be larger than the user profile.

After this, the process of saving files will begin. It may take several minutes, it all depends on the volume of the profile.

After this, an information window will open, read, click " Further".

After that, click " Close".

As a result, we have a file Windows Easy Transfer - Items from your old computer.MIG on a USB flash drive.

Go to the second computer where you want to transfer the profile, launch Data Transfer Tool (Windows Easy Transfer), Click in the first window " Further", then select External hard drive or USB flash device. In the next window select "This is my new computer."


Selecting portable profiles. If you press the " Settings", you can manually select which files should be transferred and which not.

If an error occurs Windows Easy Transfer failed to sign in as a domain account , read the article on how to resolve this error.

After a few minutes of waiting (depending on the profile size), you will receive a message indicating that the transfer operation was successful.

Now, if you log into a new computer under the user that you transferred, you will need to change the password when logging in under the account of the transferred user, after which you will see all the settings that were on the old computer, including files on the desktop, in documents, etc. ..

For some reason, Microsoft has abandoned the ability to transfer profiles for client versions of its operating systems, starting with Windows Vista. I don’t know what this is connected with, but when you go to the “User Profiles” menu, you will see that the profile copy button is disabled.

But like many other restrictions imposed by Microsoft, this too can be circumvented, do everything according to the instructions and you will succeed ;)

This article is suitable for Windows Vista, Windows 7, Windows 8, Windows 8.1. So, in order:

1) Log in under your administrator account.

2) Create a new folder to store your accounts; in my case it will look like this:

3) Next, you need to create a new user with administrator rights. To do this, go to “Control Panel” → “User Accounts” → “Adding and Removing User Accounts” → “Create an Account”. Enter any name, select “Administrator” and click “Create an account”:

4. Reboot the computer and log in as our new user:

5. Copy the folder with the profile of our main account. To do this, go to the path: C:\Users and copy the folder with the required user name to our new folder.

6. Next, go to the properties of both folders and go to the “Security” tab. Here we need to create in the folder on drive D all the same user groups as in the folder on drive C, and also give them the same access rights.

As you can see, you need to delete the “Authenticated” and “Users” groups, you also need to add the site user and the “HomeUsers” group.

In order to add or remove a user or group, you must click the “Edit” button. In the window that opens, select a user or group and click the “Delete” button or simply click the “Add” button to add a new group.

A window for selecting users and groups will open:

Click the “Advanced” button and in the new window on the right, the “Search” button:

Select the desired group and click OK until only the “Group Permissions” window remains.

As a result, you should get a full copy of the rights of the child folder:

If everything matches, press the OK button to apply the change and move on to the next step.

7. When trying to remove/add a user, the system may show the following window:

We need to get around this, so we need to disable inheritance of rights for this folder. To do this, in the folder properties in the “Security” section, click the “Advanced” button:

In this window, click the “Change permissions” button and uncheck the “Add permissions inherited from parent objects” checkbox:

Click OK and answer the Windows security question “Delete” (although you can also “Add” - this will simply save the current groups and users, but will also allow you to change them):

Also click the OK button in the additional security settings window.

8. Open the registry. To do this, press the key combination Win + R and in the “Run” window that opens, write regedit and click OK. (You can also search the Start menu in Windows 7 or Vista by typing regedit)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

And we see several groups of records in this section:

We are interested in groups of the format S-1-5-21-xxxxxxxxxx-xxx... select them one by one and look at the value of the ProfileImagePath parameter. The path should lead to the folder for the profile that we need to transfer. In my case it's this one:

Next we need to change the ProfileImagePath value to the path to the new folder. To do this, right-click on the parameter and select “Change”. I write my way, and this is what I got:

10. To be on the safe side, let’s create a symbolic link to the old location; this will solve many problems, especially if some program decides to ignore the new location. To do this, delete the old user folder and open the command line and write the following there:

mklink /J “C:\Users\*user*” “D:\Users\*user*”

Where instead *user* you need to write the name of your folder. For example, " C:\Users\Vladimir"

All that remains is to restart the system and log in with your main account.

That's all. I hope you found this article useful, click one of the buttons below to tell your friends about it. Also subscribe to site updates by entering your e-mail in the field on the right or subscribing to the group on VKontakte.

Good day, one of the first articles I wrote on this site was an article about p. The instructions were written for those who already have an operating system installed, although it is advisable to do this on a freshly installed system, it was still possible to transfer the profile even on a system that had been used for quite a long time. Today we’ll look at another, not very bad solution - transferring the profile at the stage of installing the operating system. All you need to do is install the system as usual, but stop at the user creation screen and then follow the instructions:

1) Press the key combination Shift+F10, a command prompt window will open.

Robocopy "C:\Users" "D:\Users" /E /COPYALL /XJ

Upon successful completion, the console will indicate the end date and time.

3) Delete the old folder and create a symbolic link to link the new folder to the old location (just in case;). To do this, enter two commands one by one:

Rmdir "C:\Users" /S /Q mklink /J "C:\Users" "D:\Users"

The first command is used to delete folders, the second is for .

4) Now enter the command regedit, in order to get into the registry editor.


5) In the window that opens, go to the branch:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList

And change the parameter ProfilesDirectory to the path to our profiles folder. I change it to a folder D:\Users.

Close the Registry Editor window.

6) Now let’s restart the computer, to do this, write the following command on the command line:

Shutdown -r -f -t 00

7) After restarting, create a profile, all profile folders will be saved in the location you specified.

Update : Site visitor BoontOff in the comments he suggested a good option. To avoid writing all the commands manually, you can use the file .bat. To do this, create a file users.bat and put it in the root of some drive (but not C, of ​​course). Open it with notepad and copy the following into it:

Robocopy "C:\Users" "d:\Users" /E /COPYALL /XJ rmdir "C:\Users" /S /Q mklink /J "c:\Users" "d:\Users" REG ADD "HKLM\ SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" /f /v "ProfilesDirectory" /t REG_EXPAND_SZ /d "d:\Users" Shutdown -r -f -t 00

If necessary, change the path “D:\Users” to your own. And now, when executing the instructions, immediately after the first point, just enter the following on the command line:

D:\users.bat

The script will run the sequence of actions specified in this article. It will create and copy the users folder, delete the old folder and create a symbolic link in its place, and also make a change to the registry, then the computer will restart and you can continue installing the system. If you reinstall the system quite often, you can also add a line at the beginning of the file containing the following (adjusted for your path):

Move /Y "d:\Users" "d:\Users_OLD"

After this, the old Users folder will be renamed to Users_OLD.

Thank you for this.bat BoontOff. Ready-made files can be downloaded: and .

That's all. I hope you found this article useful, click one of the buttons below to tell your friends about it. Also subscribe to site updates by entering your e-mail in the field on the right.