Appearance
WebDAV
Rclone
Mount
shell
rclone mount yangyixuan:/ X: --vfs-cache-mode full --vfs-cache-max-age 24h --vfs-cache-max-size 10G --header "Referer:" --no-consoleshell
rclone mount yangsen:/ Y: --vfs-cache-mode full --vfs-cache-max-age 24h --vfs-cache-max-size 10G --header "Referer:" --no-consoleshell
rclone mount zomia:/ Z: --vfs-cache-mode full --vfs-cache-max-age 24h --vfs-cache-max-size 10G --header "Referer:" --no-consolebat
@echo off
:: 设置后台运行,避免一直弹出一个黑色窗口
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
:: --- 配置部分 ---
:: 你的 rclone 远程配置名称
set REMOTE_NAME=yangyixuan:
:: 想要挂载的盘符
set DRIVE_LETTER=X:
:: --- 配置结束 ---
:loop
:: 检查盘符是否已经存在,不存在则执行挂载
if not exist %DRIVE_LETTER% (
echo 正在挂载 %REMOTE_NAME% 到 %DRIVE_LETTER%...
:: 推荐参数:开启全文缓存以获得最佳兼容性
rclone mount %REMOTE_NAME% %DRIVE_LETTER% ^
--vfs-cache-mode full ^
--vfs-cache-max-age 24h ^
--vfs-cache-max-size 10G ^
--header "Referer:" ^
--no-console
)
:: 如果挂载断开,每隔 10 秒尝试重新挂载
timeout /t 10
goto loopUnmount
cmd
taskkill /IM rclone.exe /F
start explorer.exepowershell
Stop-Process -Name "rclone" -ForceDelete MountPoints2 Subitems
cmd
reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2" /fpowershell
Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\*" -Recurse -Force- 表示删除该路径下的所有内容。
-Recurse 确保递归删除所有子目录。
-Force 强制执行。
clean_mounts.bat
bat
@echo off
:: 循环删除 MountPoints2 下的所有子项
for /f "tokens=*" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2"') do (
reg delete "%%a" /f
)
pausereset_mounts.reg
reg
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2]