How to change ownership of a file in Windows 10

Solution 1:

Try:

Taking ownership of a file or folder from command line

Open an elevated Command Prompt window.

To do so:

a. Go to > Start > All Programs > Accessories

b. Right-click on Command Prompt, and then click Run as Administrator.

c. Type the following command and press Enter key:

takeown /f [path to folder] /r /d y

d. Then assign the Administrators group Full Control Permissions for the folder, use this command and hit Enter key:

icacls [path to folder] /grant administrators:F /T 

The /T parameter is added so that the operation is carried out through all the sub-directories and files within that folder.