Take The Power Back – Using TAKEOWN Command To Reclaim Ownership of Files & Folders In Windows

Some times when you copy files and folders from one computer to another you may run into permission errors (access denied etc) when accessing or editing them, the TAKEOWN command in the command prompt can solve this quickly and easily, as stated in the documentation, TAKEOWN enables an administrator to recover access to a file that was previously denied, by making you the owner of the file.

Here is a quick example of how I use it, say you have a folder full of files and possibly other subfolders that you want to take ownership, the path to the folder being ‘C:\Users\User\Documents’. To take ownership of this folder and all the files inside of it you will need to firstly, open the command prompt as an Administrator and type the following command:

TAKEOWN /F “C:\Users\User\Documents” /R /D Y

  • The /F flag defines the path to the folder that you wish to take ownership of.
  • The /R flag recurses that directory, meaning that it will also take ownership of any other folders and their contents inside the Documents folder.
  • The /D flag suppresses the prompt that is displayed when the user does not have list folder permission on the specified target directory. It can take a Y for yes or an N for no.

For more information on using the TAKEOWN command you can type:

TAKEOWN /? – this will display all the other flags and explanations of what they do.

Leave a Reply