2

I've a quest to change the owner on about 800 folders. The owner should be equal to the folder name. I've tried something like this:

set /p userDir=username
ICACLS "D:\test\%userDir%" /setowner "domain\%userDir%" /T

But I get the error message

"ICACLS: Comparison between user names and security IDs was not made"

If I change %userDir% to an actual folder name it will work. Could you please tell what is wrong?

  • Does look too overly complex? I see one of the actual scripts for changing ownership of folder to user of same name of folder is posted by Pimiento benzieglmeier May 19, 2014 at 4:11 PM Change Permissions and Ownership Powershell – Jon Conley Jul 19 '14 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.