Home » KBArticles » Taking ownership of multiple folders and files

Taking ownership of multiple folders and files

Situation
Numerous roaming profiles without the administrator added for NTFS permissions. Access was denied for copying, moving etc.

Native tools for taking ownership of multiple folders and files for end user profiles.

Command

Taking Ownership
TAKEOWN.exe /F <folderpath> /R /A /D Y

/F = path
/R=recurvise
/A=owner to administrators rather than logged on user
/D = default answer to setting list folder permission Options: Y or N

Set NTFS Permissions on multiple files
Set permissions instead
icacls.exe <folderpath> /grant administrators:F /T

To run this command on a range of folders get the list into a txt file with each entry on a single line and run

for /f %1 in (c:folders.txt) do takeown.exe /F %1 /R /A /D Y

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.