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?

user9517
  • 114,104
  • 20
  • 206
  • 289
user164808
  • 21
  • 1
  • 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](http://community.spiceworks.com/topic/413259-change-permissions-and-ownership-powershell) – Jon Conley Jul 19 '14 at 22:37

0 Answers0