Aussie owned and operated, with 23+ years of industry experience, Gold Coast InfoTech is delighted to support all of your business technology requirements.

Gallery

Contacts

success@goldcoastinfotech.com.au

1800 291 071

KBArticles Scripts, Commands, Registry

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

Author

Customer

Leave a comment

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