10.20.2013

Quick way to delete a bunch of folders

Quick way to delete a bunch of folders

del /f /s /q foldername > nul
rmdir /s /q foldername
sdelete -z drive letter

If problems with permissions on folder and files exist run this command to recursively fix the permissions on the inherited files.

icacls "build\*" /q /c /t /reset

takeown /f "D:\TSPROFILE$\REY" /r /d y
icacls "D:\TSPROFILE$\REY" /grant christian:F /t /q
icacls "D:\TSPROFILE$\REY\*" /q /c /t /reset

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.