欢迎光临
我们一直在努力

使用软件rclone在Windows操作系统上挂载OneDrive为本地硬盘的操作方法

1、rclone下载地址:

飘云网盘下载:http://piaoyun.online/电脑软件/上传下载/rclone
官网下载:https://rclone.org/downloads/
GitHub下载:https://github.com/ncw/rclone
另外Windows使用rclone还需要另一个依赖工具winfsp,下载地址:http://www.secfs.net/winfsp/download/

01.png
02.png
下载完成后在解压到你喜欢的文件夹下,例如我的:
03.png

2、配置环境变量

04.png
双击Path,把刚才解压到的文件路径新加到Path,比喻我的C:\Software\Tools\rclone-v1.45-windows-amd64:

3、检查rclone是否配置成功

win+X,然后按A,输入rclone --version,如果出现下面的输出则安装成功,否则重复上面步骤。
05.png

4、开始配置rclone

01.jpg

02.jpg

03.jpg

If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
Choose a number from below, or type in an existing value
1 / OneDrive Personal or Business
   \ "onedrive"
2 / Root Sharepoint site
   \ "sharepoint"
3 / Type in driveID
   \ "driveid"
4 / Type in SiteID
   \ "siteid"
5 / Search a Sharepoint site
   \ "search"
Your choice> 1  #选择1,OneDrive Personal or Business 网盘类型
Found 1 drives, please select the one you want to use:
0:  (personal) id=28acee48ba0a80c9
Chose drive to use:> 0     #注意前面的编号,一般是0.
Found drive 'root' of type 'personal', URL: https://onedrive.live.com/?cid=28acee48ba0a80c9
Is that okay?
y) Yes
n) No
y/n> y    #选择y
--------------------
[OneDrive]
type = onedrive
token = {"access_token":"EwB4A8l6BAAURSN/FHlDW5xN74t6GzbtsBBeBUYAAZr+nsbvDJvpTZnIGTclACszh9PmiR6klQruRt9oBU5AD5ReAZLULrKBbFjgQzmUJHTW1Qg9EI2zCoj+/XMlp4M0V2sraXxwnDZvP/xHtLgMGIF3PLOjlSU0ThhHyB5OjIIeh3KCdA4/RIkAALoI7x5ycwXQLuBJ+D/iX3QwJFhVO4or7ogiaVUF0I3oF/A7dOEBJljUwHnBhYeyjOEpCRtoOXIrKl08afJbKtjV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mMhUtmfBO2kpXvkAONhNG8nN9zWaGsXLXh0QDpCIu2!rLrpqH0Bi0amMocXotNGEFHrASLP583x2fpX5Da3VY*AFM18uIpsvg7i0aTj*RBZMvIV7OD02e1fAplBUmMzDodYGVelOFBKo8gd*xqZYYe7eQWaAv1SYuMBCduMcgewV71IUFw5TsdYONN5y!ewQcrv9*hhxoLI8xK7VY8VSwG8!9e21N6yLYFFHsTYZMMUOcF0LFEJmo1b29xRkShfuXXk6mxajTCn3IUbOKKP9EW","expiry":"2018-12-14T19:12:44.8939629+08:00"}
drive_id = 28acee48ba0a80c9
drive_type = personal
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y   #选择y
Current remotes:

Name                 Type
====                 ====
OneDrive             onedrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>

clip_image0103.gif

04.jpg

05.jpg
到这里已经把OneDrive配置好了,选择q结束配置
clip_image0143.gif

注:配置文件在当前用户家目录
06.png

5、挂载OneDrive为本地硬盘

rclone mount onedrive: D:\onedrive --allow-other --vfs-cache-mode writes --allow-non-empty & //挂载文件夹的话
#onedrive就是前面第3步起的名

rclone mount onedrive:/ O: --cache-dir I:\OneDriveTemp --allow-other --vfs-cache-mode writes --allow-non-empty & //挂载盘符的话
#onedrive就是前面第3步起的名
rclone mount OneDrive:/ H: --cache-dir E:\OneDrive --vfs-cache-mode writes &

如果出现:The service rclone has been started.则说明挂载成功
06.jpg

上传文件到网盘,文件是先复制到缓存目录,然后再上传,等上传完成之后缓存目录的文件并不会自动删除,所以记得定时清理该目录

最后说一点,执行上面这条命令退出终端后台挂载程序也会退出,达不到我们的目的,所以在命令后面加一个&符号就行了,这样退出终端后台程序照样运行,像这样:
07.png

其他盘如GoogleDrive、DropBox等等也可以通过这种方式挂载,这样使得云端文件就像本地文件一样,只要你宽带够大,可以与本地硬盘一样无差别体验。

赞(1)
未经允许不得转载:飘云 » 使用软件rclone在Windows操作系统上挂载OneDrive为本地硬盘的操作方法
分享到: 更多 (0)