递归删除 desktop.ini 文件

gio*_*135 3 powershell cmd delete-file

我正在尝试删除desktop.ini给定目录中的所有文件;即Documents\Gio。我试着del /S desktop.ini和del /S *.ini在CMD(管理模式),get-childitem .\ -include desktop.ini -recurse | foreach ($_) {remove-item $_.fullname}并get-childitem .\ -include *.ini -recurse | foreach ($_) {remove-item $_.fullname}在PowerShell中(也管理员)。两者都没有工作。我该怎么办?

这些desktop.ini文件包含以下内容:

[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
IconIndex=12
Run Code Online (Sandbox Code Playgroud)

我从我的 Google Drive 文件夹中移动了目录,但所有文件夹上仍然有共享图标。我试图将目录及其所有子目录和文件的所有权更改为不同的帐户。我尝试使用 Google Drive 执行此操作,但只有根目录更改了所有权;我无法删除其中的任何文件或目录。

小智 6

del /s /a desktop.ini
Run Code Online (Sandbox Code Playgroud)

查看del /?帮助。