Is there a tool or command which will compare two directory trees on separate computers and output a list of differences, including differences in permissions?

I was looking at http://winmerge.org/ and it didn't seem to have this feature- it seems to compares file sizes and contents, but not attributes. Took a look through the options, but didn't see a setting to change this.

I've had some problems in the past with permissions getting messed up on some driver directories after an update and it would nice to compare a working installation with a broken one.

link|improve this question

80% accept rate
feedback

3 Answers

up vote 2 down vote accepted

Have you throught about using PowerShell to do this?

PS2 includes a cmdlet get-acl which enums the NFTS permissions (including owner) for a given folder/file.

link|improve this answer
Yes, I did think about Powershell - but had hoped not to use it. I don't use it often enough to get comfortable with it. – Sam Feb 3 '10 at 15:26
feedback

Can't find anything that will perform a "diff" on file permissions in Windows, but I do know that RoboCopy and Richcopy (http://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx?pr=blog) will copy files while preserving NTFS attributes like permissions.

link|improve this answer
feedback

Highly recommended: setacl.
This is a free tool you can obtain from helgeklein.com

To compare two directories I did this:
- made a list of all ACL's in both folders
- list in a text format
with setacl this is done like this
setacl -ot file -on folderA -actn list -lst "f:tab" > listA
setacl -ot file -on folderB -actn list -lst "f:tab" > listB
- compare the 2 lists
I do this with diff (cygwin collection)
diff listA listB

I had a problem with comparing two user folders.
These folders needed to have identical ACLs except for the user who 'owned' the folder.
I solved this by replace the username in the ACL with a common name 'customer'.
This allowed me to compare the ACL without having an obvious difference on the username itself.

link|improve this answer
You could also use the dos command "COMP" to compare. – djangofan Nov 15 '11 at 23:27
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.