如何将外部文件夹与SkyDrive同步

如何将外部文件夹与SkyDrive同步

Microsoft launched its new SkyDrive desktop app which is set to compete head-to-head with Dropbox and Google Drive. Here’s how to sync folders that are outside of your SkyDrive folder.

微软推出了其新的SkyDrive桌面应用程序,该应用程序将与Dropbox和Google Drive展开激烈的竞争。 这是同步SkyDrive文件夹之外的文件夹的方法。

使用重定位点 (Using a Reparse Point)

Known as the Soft Link to some, a Symbolic Link is the most common form of reparse point. Luckily for us Windows Vista and later include a command line utility, called mklink, which can be used to manage symbolic links. In order to create a symbolic link we first need to find your SkyDrive folder which, buy default, is located at:

符号链接被称为某些链接的软链接,是最常见的重解析点形式。 幸运的是,Windows Vista和更高版本包含一个名为mklink的命令行实用程序,可用于管理符号链接。 为了创建符号链接,我们首先需要找到您的SkyDrive文件夹(默认购买)位于:

C:\Users\”Your Username”\SkyDrive

C:\ Users \“您的用户名” \ SkyDrive

This is also known as the %userprofile% environment variable, which makes it extra easy to create a symbolic link. So go ahead and fire up a administrative command prompt.

这也称为%userprofile%环境变量,它使创建符号链接特别容易。 因此,继续执行管理命令提示符。

如何将外部文件夹与SkyDrive同步

Now we need to use mklink to create a symbolic link, the syntax to link to a folder is:

现在我们需要使用mklink创建一个符号链接,链接到文件夹的语法是:

mklink /d <link> <target>

mklink / d <链接> <目标>

For files we don’t need the “/d” switch so we can just use:

对于文件,我们不需要“ / d”开关,因此我们可以使用:

mklink <link> <target>

mklink <链接> <目标>

But as an added bonus we can use our environment variable, so we can do something like this:

但是,作为额外的好处,我们可以使用我们的环境变量,因此我们可以执行以下操作:

mklink /d “%userprofile%\SkyDrive\Music” C:\Music

mklink / d“%userprofile%\ SkyDrive \ Music” C:\ Music

如何将外部文件夹与SkyDrive同步

Above I created a symbolic link that points to the Music folder on the root of my “C” drive. This means that any files I put into that folder will be automatically uploaded to my SkyDrive, you can check this by looking at your SkyDrive.

在上方,我创建了一个符号链接,该链接指向“ C”驱动器根目录上的“音乐”文件夹。 这意味着我放入该文件夹的所有文件都会自动上传到我的SkyDrive,您可以通过查看SkyDrive进行检查。

如何将外部文件夹与SkyDrive同步
如何将外部文件夹与SkyDrive同步

As you can see my symlink is there and functioning just as we expected. That’s all there is to it, happy symlinking

如您所见,我的符号链接在那儿并且按我们预期的那样工作。 这就是全部,快乐的符号链接

翻译自: https://www.howtogeek.com/112141/how-to-sync-external-folders-with-your-skydrive/