【问题标题】:How do I delete folder that that was synced with Onedrive but refused to stop syncing?如何删除与 Onedrive 同步但拒绝停止同步的文件夹?
【发布时间】:2020-12-13 10:42:49
【问题描述】:

我正在尝试删除这个项目文件夹,但即使在我运行 rm -force 之后它仍然拒绝我。它向我展示了这个:

is an NTFS junction point. Use the Force parameter to delete or modify this object.
At line:1 char:1
+ rm .\db\
+ ~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\KenGon...git\objects\db\:DirectoryInfo) [Remove-Item], IOException
    + FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand

.

rm : There is a mismatch between the tag specified in the request and the tag present in the reparse point
At line:1 char:1
+ rm .\db\ -force
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-Item], Win32Exception
    + FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.RemoveItemCommand

当移入文件夹并尝试列出文件夹内容时,它会向我显示:

ls : The tag present in the reparse point buffer is invalid.
At line:1 char:1
+ ls
+ ~~
    + CategoryInfo          : ReadError: (C:\Users\KenGon....git\objects\db:String) [Get-ChildItem], IOException
    + FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand

有什么方法可以删除这个文件夹吗?我已经停止与 OneDrive 同步并多次重新启动它。我在微软论坛上找到的建议似乎没有帮助。即使暂停同步后,文件夹仍显示蓝色圆形箭头 - 仍在同步?

【问题讨论】:

    标签: onedrive


    【解决方案1】:

    这很愚蠢,但我运行了chkdsk /f /r 并且不得不强行重启我的计算机。不确定导致文件夹不可变的确切错误是什么。当我尝试在同步时删除 OneDrive 时,似乎是一些损坏的数据,导致了一些问题。

    【讨论】:

    • 它为我修好了。同步文件夹时似乎存在问题,使您无法删除它们,甚至无法进入它们,显示错误“重解析点缓冲区中存在的标签无效”。以管理员身份运行此命令可修复它。请注意,它需要重新启动,并且可能需要几个小时才能完成。
    【解决方案2】:

    替代且可能更快的解决方案:使用适用于 Linux 的 Windows 子系统 (WSL),更改目录并删除文件/文件夹

    rm -r -f mybrokenfolder
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-02
      • 1970-01-01
      • 2015-01-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多