Compare 2 directories

May 30, 2008
120
1
I want to compare 2 directories to see where they differ. Essentially,
see which files and/or directories are only in one place (if directory
X is only in one, I don't need to see all the files within that
directory reported as well).

The nearest I can get is SYNC /S /E /N, but that reports file-by-file,
even for directories that are completely missing.

Using external tools, Gnu diff gets me partway there, diff -qr reports
differences, but doesn't say which are files and which are
directories.

Is there a way of doing this that I've missed? It seems a simple
enough thing that I need, but it's harder than I'd expect to find a
good solution :-(

Thanks,
Paul.
 

samintz

Scott Mintz
May 20, 2008
1,501
16
Solon, OH, USA
Have you looked at WinMerge yet? It does a very good job at both file and
directory differencing. It integrates with ClearCase. And it's free (my
favorite price).

-Scott

"p.f.moore" <> wrote on 08/13/2008 09:34:38 AM:


> I want to compare 2 directories to see where they differ. Essentially,
> see which files and/or directories are only in one place (if directory
> X is only in one, I don't need to see all the files within that
> directory reported as well).
>
> The nearest I can get is SYNC /S /E /N, but that reports file-by-file,
> even for directories that are completely missing.
>
> Using external tools, Gnu diff gets me partway there, diff -qr reports
> differences, but doesn't say which are files and which are
> directories.
>
> Is there a way of doing this that I've missed? It seems a simple
> enough thing that I need, but it's harder than I'd expect to find a
> good solution :-(
>
> Thanks,
> Paul.
>
 
Jun 3, 2008
121
1
Temecula, CA
If you've got Microsoft Visual Studio, within the Visual SourceSafe IDE
is a comparison tool that is ordinarily used to compare files or
directories to corresponding files or folders within VSS. Oddly enough,
however, it can also be used to compare items, neither of which are in
VSS. When comparing folders recursively, it will do exactly what you
want, I believe.

I can't believe I just recommended something within VSS, since for most
other things, VSS is a pretty poor SCM tool.

Oh, and for general file and directory compare utilities, I highly
recommend two completely different and free utilities. One is CSDiff,
from ComponentSoftware. It comes bundled as part of their CS-RCS tool
(a GUI for RCS) which is also free for limited uses and not free for
enterprise environments, but CSDiff is also available independently and
completely free. See http://www.componentsoftware.com/products/csdiff/
for more information.

The second free comparison utility I also like is SourceGear DiffMerge. I've been using CSDiff
for many years and really like it, but it had a few shortcomings. I
went and found DiffMerge and have been using it for a little while and
found it quite good as well.

I have no stake in either of the freeware utilities mentioned above.
I'm just a satisfied user.

________________________________

From: p.f.moore [mailto:]
Sent: Wednesday, August 13, 2008 6:35 AM
To: Mickey Ferguson
Subject: [Support-t-389] Compare 2 directories

I want to compare 2 directories to see where they differ. Essentially,
see which files and/or directories are only in one place (if directory
X is only in one, I don't need to see all the files within that
directory reported as well).

The nearest I can get is SYNC /S /E /N, but that reports file-by-file,
even for directories that are completely missing.

Using external tools, Gnu diff gets me partway there, diff -qr reports
differences, but doesn't say which are files and which are
directories.

Is there a way of doing this that I've missed? It seems a simple
enough thing that I need, but it's harder than I'd expect to find a
good solution :-(
 
May 30, 2008
120
1
2008/8/13 MickeyF <>:

> If you've got Microsoft Visual Studio
[...]

> Oh, and for general file and directory compare utilities, I highly
> recommend two completely different and free utilities.

I didn't make this clear, but I'm really after command line answers.
And specifically, is there anything native in TCC (I have Gnu diff if
I need an external utility).

Thanks for the suggestions anyway.
Paul.
 
May 30, 2008
42
0
From: p.f.moore
Sent: Wednesday, August 13, 2008 12:24 PM
Subject: RE: [Support-t-389] Compare 2 directories

>
> I didn't make this clear, but I'm really after command line answers.
> And specifically, is there anything native in TCC (I have Gnu diff if
> I need an external utility).

Try this:

http://israel.logiclrd.cx/

It's a quick hack that I just threw together, but it worked for a little
test case I created.

Jonathan Gilbert
 
May 30, 2008
120
1
2008/8/15 logic <>:

>> I didn't make this clear, but I'm really after command line answers.
>> And specifically, is there anything native in TCC (I have Gnu diff if
>> I need an external utility).
> ---End Quote---
> Try this:
>
> http://israel.logiclrd.cx/

Did I miss something? I can't see which of the links on that page relates.
Paul.
 
Similar threads
Thread starter Title Forum Replies Date
R How to? Compare executables' version/build # including 123.456.789.01 Support 10
M How to? Compare file timestamps accross different file systems... Support 1
C custom string compare? Support 8
C Suggestions for Compare Folder Tree routine Support 5
MickeyF how to compare version strings Support 11
R best file compare util Support 5
deleyd Need example of @COMPARE Support 1
gworley Virtual network drive filename completion doesn’t get directories Support 0
thorntonpg sync /S /F creating empty directories Support 5
WadeHatler pdir broken in 19.1 for directories with spaces Support 1
P Color directories in Win10 build 10586 console Support 11
R How to? Name completion only of directories? Support 3
fromano How to? Everything finding directories with 2 or more files in them Support 3
M Problem with Extended Search and non-ASCII characters in directories names Support 3
R How to? Is there a way to see current directories in all drives? Support 11
M . and .. directories counted by @files function Support 5
J rmdir /s recurses into symlinkd directories Support 4
D ffind and directories Support 2
S Listing the paths of all directories of a given name Support 4
thedave Newly created directories missing from TCMD Support 0
S GPF after successfully renaming directories on an ftp server Support 2
nikbackm Sorting (DIR) over sub-directories Support 3
S DEL unhides directories Support 9

Similar threads