截至今天,我在Amazon Drive、Google Drive、Microsoft OneDrive、iCloud Drive 和 Dropbox上有一个云(Drive and Dropbox)存储帐户(storage account)。我主要使用Dropbox,但我也在Kindle Fire上使用Amazon Drive,在Windows 10上使用(Windows 10)OneDrive ,在照片和视频上使用Google Drive。我一直遇到的一个问题是我想将我的文件夹与这些服务同步,但我不喜欢我必须将所有文件复制或移动到它们的特殊容器文件夹中的事实。
相反,我希望有一种方法能够将我的文件夹保存在“我的文档”(Documents)或任何我拥有它们的地方,并且仍然让它们与云服务同步。我了解到最好的方法是在Windows中使用符号链接。符号链接有点像创建文件夹的快捷方式,但它更永久,并且就像一个单独的文件夹,即使它不是。
在本文中,我将引导您完成创建符号链接的步骤,以便您可以将计算机上的任何文件夹与云服务(cloud service)同步,而无需移动它。请注意,Google有一个名为(Google)Backup and Sync的单独程序,它允许您选择计算机上的任何文件夹以备份到Google Drive,我将在下面解释。
将文件夹同步(Sync Folders)到Dropbox 和 OneDrive(Dropbox and OneDrive)
在我进入OneDrive的步骤之前,我想提一下他们现在有一个名为AutoSave的选项,可让您将桌面(Desktop)、我的文档和图片文件夹(My Documents and Pictures folders)的内容移动到 OneDrive,而无需您做任何事情。基本上(Basically),他们将本地文件夹指向 OneDrive 文件夹以使其无缝。
但是,它仅适用于这三个文件夹。如果您在其他位置保存了文件夹,则需要将其移动到OneDrive 文件夹(OneDrive folder)或创建符号链接。为了为Dropbox 或 OneDrive(Dropbox or OneDrive)完成此操作,我创建了一个示例来引导您完成整个过程。正如您在下面看到的,我的OneDrive 文件夹(OneDrive folder)在左侧,在 C:Test 中有一个名为 OneDrive Test的文件夹。( OneDrive Test )
所以我想将OneDrive 测试文件夹(OneDrive Test folder)同步到我的 OneDrive帐户文件夹(account folder)而不移动它。为此,您必须打开提升的命令提示符并键入(command prompt and type)以下命令:
mklink /J "C:\Users\Aseem\OneDrive\Personal" "C:\Test\OneDrive Test"
所以让我解释一下我们在这里做什么。我们正在使用mklink(mklink)命令创建符号链接(symlink) 。它有两个参数:第一个是要创建的符号链接的位置,第二个是源目录(source directory)。如您所见,我不需要在OneDrive 文件夹中创建(OneDrive folder)Personal文件夹,mklink 命令(mklink command)将为我完成。此外,您可以为文件夹使用任何您想要的名称。
所以我告诉Windows在名为Personal的OneDrive 文件(OneDrive folder)夹中创建一个符号链接文件(link folder)夹,它实际上只是指向 C:\Test\OneDrive Test文件夹。创建链接后,您将在 OneDrive 文件夹中看到Personal 文件夹:(Personal folder)
如果您打开该文件夹,则路径将显示为好像它存储在OneDrive\Personal中,而实际上它存储在Test 文件夹(Test folder)中。因此,现在您可以从任一位置将文件添加到文件夹,并且两者都将具有相同的内容,因为它实际上是一个文件夹,而不是两个。而已!
OneDrive 和Dropbox都支持符号链接(support symbolic link)文件夹,并将所有内容同步到云端,如下所示:
将文件夹同步到 Google Drive
对于Google Drive,首先下载上面提到的备份和同步软件(Backup and Sync software)。开始安装后,您将看到步骤 2(step 2)的以下屏幕:
默认情况下,它将选择桌面(Desktop)、文档和图片(Documents and Pictures),但您可以单击选择文件夹(Choose Folder)并选择您想要的任何文件夹。您还可以单击更改(Change)链接以仅备份照片和视频或添加您不想同步的文件扩展名。
在步骤 3(step 3)中,您选择要同步到本地 PC 的文件夹。我通常所做的只是取消选中Sync My Drive to this computer,因为我只是将它用作我的 PC 的备份。
所以你有它!现在,您可以将计算机上的任何文件夹与您的云服务同步。要么您必须创建一个符号链接,要么可能有一个功能可以让您选择要同步的文件夹。如果您有任何疑问或问题,请在此处发表评论,我会尽力提供帮助。享受!
Sync Any Windows Folder with Google Drive, OneDrive and Dropbox
As of today, I haνe a cloud storage account on Amazon Drіve, Google Drive, Microsoft OneDrive, iClоud Drive and Dropbox. I moѕtly use Dropbox оverall, but I also use Amazon Drive on my Kindle Fire, OneDrive on Windows 10 and Google Drive for my photos аnd videoѕ. One issue that I always had is that I want to sync my folders wіth these ѕervices, but I don’t like the fact that I havе to copy or move all the files to their special container folders.
Instead, I wanted a way to be able to keep my folders in My Documents or wherever I had them and still have them sync with the cloud services. I learned that the best way to do this is to use symbolic links in Windows. A symbolic link is kind of like creating a shortcut to a folder, but it’s more permanent and acts like a separate folder, even though it’s not.
In this article, I’ll walk you through the steps to create symbolic links so that you can sync any folder on your computer with your cloud service without moving it. Note that Google has a separate program called Backup and Sync that allows you to choose any folder(s) on your computer to backup to Google Drive, which I will explain below.
Sync Folders to Dropbox and OneDrive
Before I get into the steps for OneDrive, I wanted to mention that they now have an option called AutoSave that lets you move the contents of the Desktop, My Documents and Pictures folders to OneDrive without having to do anything on your part. Basically, they point the local folders to the OneDrive folders to make it seamless.
However, it’s only for those three folders. If you have a folder saved somewhere else, you’ll need to either move it to the OneDrive folder or create a symbolic link. To get this done for Dropbox or OneDrive, I have created an example to walk you through the process. As you can see below, I have my OneDrive folder on the left and a folder called OneDrive Test inside C:\Test.
So I want to sync the OneDrive Test folder to my OneDrive account folder without moving it. To do this, you have to open an elevated command prompt and type in the following command:
mklink /J "C:\Users\Aseem\OneDrive\Personal" "C:\Test\OneDrive Test"
So let me explain what we are doing here. We are creating a symbolic link (symlink) using the mklink command. It takes two parameters: the first is the location of the symbolic link you want to create and the second is the source directory. As you can see, I don’t need to create the Personal folder in the OneDrive folder, the mklink command will do that for me. Also, you can use any name you want for the folder.
So I am telling Windows to create a symbolic link folder in the OneDrive folder called Personal that is actually just pointing to the C:\Test\OneDrive Test folder. After the link is created, you’ll see the Personal folder inside of OneDrive folder:
If you open that folder, the path will show as if it’s stored in OneDrive\Personal, when it actually is stored in the Test folder. So now you can add files to the folder from either location and both will have the same contents since it’s actually one folder, not two. That’s it!
OneDrive and Dropbox both support symbolic link folders and will sync everything up to the cloud like shown below:
Sync Folders to Google Drive
For Google Drive, start by downloading the Backup and Sync software mentioned above. Once you start the installation, you’ll get the following screen for step 2:
By default, it will select Desktop, Documents and Pictures, but you can click on Choose Folder and pick any folder you want. You can also click the Change link to backup only photos and videos or add file extensions that you do not want to sync.
In step 3, you choose which folders you want to sync down to your local PC. What I normally do is just uncheck Sync My Drive to this computer, since I’m only using it as a backup for my PC.
So there you have it! Now you can sync any folder on your computer with your cloud service. Either you’ll have to create a symbolic link or there may be a feature whereby you can pick the folders you want to sync. If you have any questions or problems, post a comment here and I’ll try to help. Enjoy!