Created
November 11, 2012 08:03
-
-
Save lichengwu/4054127 to your computer and use it in GitHub Desktop.
win7/win8强制删除文件夹
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /p path=path: | |
set /p user=user: | |
rem 我们需要修改文件或目录的所有者 | |
takeown /F %path% /R | |
rem 给用户授权文件夹或文件的完全控制权限 | |
icacls %path% /grant %user%:F /t | |
rem 删除 | |
rd /s /q %path% | |
del %path% | |
@echo finish... | |
@pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment