我正在尝试删除使用powershell和del生成的文件,但我收到此消息
del : Cannot remove item C:\Users\stefano.borini\<redacted>\.tox\py36\Include\fakepq.h: You do not have sufficient access rights to perform this operation.
At line:1 char:1
+ del .\.tox\
+ ~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (fakepq.h:FileInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
del : Cannot remove item C:\Users\stefano.borini\<redacted>\.tox\py36\Include\fakesql.h: You do not have sufficient access rights to perform this operation.
但是,我可以右键单击这些项目,然后将它们从Windows资源管理器中删除而没有任何问题。为什么?
答案 0 :(得分:1)
您是否以管理员身份运行Powershell?
如果是这样,您可以尝试在命令中添加“ -force”。