Backup any folder with OneDrive

Valéry Raulet
3 min readMar 23, 2024
Photo by Markus Spiske on Unsplash

I have photos stored on a NAS drive and I wanted to back them up in the cloud while still keeping my original files on the drive. I figured I would google for a couple of minutes and I would have an immediate answer…that was not the case.

So Today, I am sharing a couple of tips!

Tip 1 — Add a second OneDrive to your machine

If you have multiple Microsoft accounts, you can link all your OneDrive accounts. To do so,

Right-click on your OneDrive icon in the taskbar (blue cloud icon) and select Settings (gear icon) then click on Add an account.

Enter your account email and credentials and then follow the instructions.

Tip 2 — Move your OneDrive folder to a different partition/disk

If you want to move your OneDrive folder to a different location, you need to unlink then recreate the OneDrive map.

Unlink your OneDrive

Right-click on your OneDrive icon in the taskbar (blue cloud icon) and select Settings (gear icon) then click on Unlink this PC.

Unlink OneDrive from your PC

Start the setup again

If you cannot find OneDrive on your Windows PC, you can download it from the Microsoft website.

Start OneDrive Setup, enter your credentials and on the next screen, select Change location to choose a new root folder:

That’s it!

Tip 3 — Backup any folder to your OneDrive account

The process is fairly simple:

  1. Navigate to your OneDrive folder using the Windows Explorer and create a new folder

Click in the path section and copy the path to the clipboard (Ctrl+C):

2. Start a PowerShell command line using administrator privileges.

To do so so, search for PowerShell in the Start menu, then right-click and select Run as administrator:

3. Add a symbolic link between the folder you want to back up and the OneDrive folder.

In the command line, type the following:

New-Item -ItemType SymbolicLink -Path "<The OneDrive Folder>" -Target "<Your Local Folder>"

Where:

  • <The OneDrive Folder> is the path to the OneDrive you just created (you can paste from the clipboard, and
  • <Your Local Folder> is a folder accessible from your machine. It can be on a different partition/disk or even on a network drive.

I hope you found what you were looking for…

--

--

Valéry Raulet

I have been interested in business and technology since I was about 10. My interest spans across so many fields but I hope you’ll find my writing useful!