Joshua's Cheatsheets - Ms Windows

Also see general devops pages, and cmd-batch cheatsheets.

Issues deleting a file or folder:

  1. Try takeown

    • takeown [FILE]

      • OR
    • takeown /f [FOLDER] /r /d y
  2. Try using Windows GUI and "change owner" under permission - make sure to set to apply to all children, for both replacing the owner, and applying permissions recursively
  3. Try seeing if an application/user has a lock on the file/folder.

    • Try using LockHunter first

      • AWESOME gui based tool that can unlock, kill blocking processes, and even automatically do the whole process - kill the lock and delete the folder - and integrated into the windows right click menu
    • for a more manual approach, try PROCEXP from sysinternals
  4. Try booting into safe-mode and then deleting or changing permissions
  5. Nuclear option - boot into Linux and rm rf that sob

Filename and path limitations

Be aware that, even within Windows 10, there are still filename and path/directory limitations -

Markdown Source Last Updated:
Mon Nov 04 2019 04:07:59 GMT+0000 (Coordinated Universal Time)
Markdown Source Created:
Tue Sep 24 2019 04:30:43 GMT+0000 (Coordinated Universal Time)