So you’ve recently got a new computer and want to migrate your existing documents from your old one? That’s fine, you can just use an external drive, right? Well, yes, but this can be a time-consuming process and may not be the ideal solution if you don’t have an external hard drive handy. Thankfully, you can transfer your old Documents folder through Ethernet or Wi-Fi just by following a few easy steps.
Preparing your old computer
If you’ve never shared folders on your old computer before, you will need to do so now. Shared folders (or shares, as they’re sometimes called) can be accessed by other computers on your local network, provided that you know the username and password to connect to it. They’re incredibly useful if you want to access your data on a centralised NAS device, if you need to share a printer attached to a single computer, or simply need to synchronize your files from one computer to the other.
This guide deals with a specific use case, so we’re not going to delve into the nitty-gritty details on how shares work or how to keep files synchronized across multiple computers. I may do a guide on how to do that in the future, but I’m not sure when that will happen or if it will at all.
It’s advisable you connect both your computers using Ethernet cables, if possible, for this will ensure faster transfer speeds.
Turn on your old computer and locate the folder where you used to put all your documents. In our example, that would be the Documents folder for a user called Computer. Open File Explorer and browse its contents till you reach that folder, then right-click on it and choose Properties. Select the Sharing tab and click Advanced Sharing.
This dialog will appear. Make sure you tick the Share this folder checkbox. You may leave everything else at its default values. Click OK to confirm.
Leave the old PC on and get to work on the new one.
Time to copy
Now that we’re done configuring our old PC, it’s time to get to work on copying the files. First, however, we need to know the NetBIOS name of the old computer. To do this, open File Explorer and click Network. You’ll be presented with a list of computers currently connected to your local network.
In our case, the computer we want to copy data from is called ASPIRE.
Copying files by dragging and dropping
If you double-click an icon in Network, you’ll be prompted for your user name and password.
Insert your credentials and click OK to connect. You may now drag and drop your files from your old computer to the new one as if they were on the same machine. Very neat, hmm?
Automating the migration with Robocopy
If you feel adventurous and don’t mind using a bit of command-line to get the job done, you may use Robocopy. This is a command-line program that lets you copy files and folders from one location to another, even across multiple computers on the same network. In a way, it’s similar to rsync, but with a simplified syntax.
To copy our old data to our new computer, we’ll need to type the command
robocopy \\OLDCOMPUTERNAME\Documents d:\olddocuments\ /r:1 /w:1 /copy:dat /e /xj
Make sure you replace OLDCOMPUTERNAME with the actual NetBIOS name for your old computer.
Pro-tip: In case you decide you want to share the entire Users folder, it’s a good idea to use the switch
/xd AppDatato prevent robocopy from copying the AppData folder. Copying it is both pointless and can potentially hang up the process, especially if you’re not using the
Dissecting the Robocopy syntax
In our example, we used a few switches to fine-tune how Robocopy works. Here’s what each does:
|If the copy fails, for example if the file is open by a process, retry for n times. Default: 1 million retries|
|If the copy fails, wait for n seconds until attempting to copy again. Default: 30 second wait|
|Specifies what to copy. dat means that data, attributes and timestamps are copied|
|Copy all subfolders, including empty ones|
|Do not follow junctions, i.e. links. Useful when copying the entire Users folder.|
|Exclude the listed directory(ies).|