即使以管理员身份登录也无法删除文件 [英] Cannot delete a file even when logged in as an Administrator
问题描述
请告诉我我做错了什么。我试图通过命令行删除隐藏文件夹。我以管理员身份运行命令行,但仍然收到消息不足的访问。
Please could some tell me what I am doing wrong. I am trying to delete hidden folder through command line. I am running the command line as administrator but still getting message insufficient access.
这是我的命令行的屏幕截图
http://prntscr.com/4ly6is
Here is screenshot of my command line http://prntscr.com/4ly6is
这是我想要的代码
rmdir "c:\xampp\htdocs\prestashop\dfs"
我得到的错误:
Cannot remove item .... You do not have sufficient access rights to perform this operation.
推荐答案
只是因为您是管理员,您有权利。您是否将PowerShell作为升级用户(UAC)运行?你检查了有问题的文件的权限,以确保吗?文件是否正在使用中?
Just because you are an admin doesn't automatically mean you have rights. Are you running PowerShell as an elevated user (UAC)? Have you checked the permissions of the files in question just to be sure? Are the files in use perhaps? Although if that was the case I would expect access is denied.
您也尝试过使用 -recurse
和 -force
以确保它得到他们所有?对于它的价值 rmdir
是 Remove-Item的别名
Have you tried also using -recurse
and -force
to be sure it gets them all? For what its worth rmdir
is an alias for Remove-Item
Remove-Item "c:\xampp\htdocs\prestashop\dfs" -Recurse -Force
您会看到,来自TechNet , -Force
cmdlet删除无法更改的项目,例如隐藏或只读文件
这篇关于即使以管理员身份登录也无法删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!