icacls viewing permissions relative to the root of a folder?

0

If I have two folders: C:\windows\system32\tasks\ and C:\temp\tasks\ and I want to compare permissions on them.

I can use the icacls "C:\temp\tasks\*" /T > C:\temp\tasks_temp.txt to compare them, but it always results in absolute paths.

Is there a way to make the output of the command display files and folders relative to the directory the command was run in?

leeand00

Posted 2015-04-16T19:40:56.637

Reputation: 14 882

How about icacls "C:\temp\tasks\*" /save "C:\temp\tasks_temp.txt" /T? Otherwise you could simply delete the absolute paths (in this case C:\windows\system32 and C:\temp) from each file before comparing. – Karan – 2015-04-16T20:11:57.573

Doesn't that output binary? – leeand00 – 2015-04-16T20:13:53.407

1Not binary, something like this: Filename.ext D:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;FA;;;S-1-5-21-4129710790-1670214157-1866183465-1000) If you don't want that then the other suggestion above is probably your only way out. – Karan – 2015-04-16T20:15:36.220

No, what I'm saying is that this is not the output that I'm getting...oh wait, when I open it in notepad instead of VIM it looks fine. hmm must be some weird encoding. – leeand00 – 2015-04-16T20:24:21.817

2Unicode little endian without BOM. – Karan – 2015-04-16T20:27:59.250

Ecch! I guess Vim doesn't detect that. – leeand00 – 2015-04-16T20:32:06.873

No answers