How To Silently Recursively Take Ownership of a Folder and Sub-Folders In Command Prompt

One of the first few things you might encounter after upgrading your existing Windows to Windows 8.1 is the file and folder/directory permission problem. If you have multiple disk drive, as well as multiple users or a new user for the new Windows 8.1, then you might have some of the folders become inaccessible due to the lake of permission after the system was upgraded to Windows 8.1.

You might get a warning message like the following “You don’t currently have permission to access this folder.” Click Continue to permanently get access to this folder.

You don't currently have permission to access this folder

You don’t currently have permission to access this folder

You have the choice to click “Continue”. In most case, this will fix the issue of not being able to get access to the folder. But sometimes, you might still run into issues where all the child folders have the same problem, unable to access this folder because of the lack of permission. In this case, you can manually click “Continue” for every single child directory or use a command line utility called “takeown” to achieve this.

takeown command

takeown /a /r /d Y /f D:\PATH\

Launch command prompt as administrator. You can do so in Windows 8.1, by right click on the Start Menu > Command Prompt (Admin) and type the following command. Let me explain what this command is doing, /a is telling the computer to grant ownership to the administrator /r recursively find all folders and sub-folders and files. /d Y is to answer yes to any prompt if needed, /f specific root folder you’d like to start on.

By doing so you will see messages fly by on each success permission update, “SUCCESS: The file (or folder): “…” now owned by the administrator group. You are now successfully silently updated file permission to the new system.

Success takeowner

Mission of taking folder ownership succeeded

If you don’t want to grant the permission to administrator group, just drop /a in the command and it will grant permission to the current user. This will save you tons time on file permission headaches when upgrade your system to a new OS, particularly after Windows 8.1 upgrade.

Jonathan Hu

Programming by day, Web Development, Canucks & Movies for spare time!
Co-founder of Next of Windows and a cool geek 🙂

Last updated: 08/04/2014

Posted in: How to , Tips & Tricks
Discover more: , ,

Leave a Reply

Notify of
avatar
Aadi
Guest

salute… 🙂

wpDiscuz
Today's Top Picks for Our Readers:
Recommended by Recommended by NetLine