1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Compare 2 directories

Discussion in 'Support' started by p.f.moore, Aug 13, 2008.

  1. p.f.moore

    Joined:
    May 30, 2008
    Messages:
    122
    Likes Received:
    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.
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,190
    Likes Received:
    11
    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:


     
  3. MickeyF

    Joined:
    Jun 3, 2008
    Messages:
    76
    Likes Received:
    1
    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 :-(
     
  4. p.f.moore

    Joined:
    May 30, 2008
    Messages:
    122
    Likes Received:
    1
    2008/8/13 MickeyF <>:

    [...]

    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.
     
  5. logic

    Joined:
    May 30, 2008
    Messages:
    42
    Likes Received:
    0
    From: p.f.moore
    Sent: Wednesday, August 13, 2008 12:24 PM
    Subject: RE: [Support-t-389] Compare 2 directories

    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
     
  6. logic

    Joined:
    May 30, 2008
    Messages:
    42
    Likes Received:
    0
  7. p.f.moore

    Joined:
    May 30, 2008
    Messages:
    122
    Likes Received:
    1
    2008/8/15 logic <>:

    Did I miss something? I can't see which of the links on that page relates.
    Paul.
     
  8. logic

    Joined:
    May 30, 2008
    Messages:
    42
    Likes Received:
    0
    From: logic
    Sent: Friday, August 15, 2008 12:22 PM
    To: jgilbert@workwireless.com
    Subject: RE: [Support-t-389] Compare 2 directories

    I hit send on this more than 10 minutes before it actually showed up. This
    is really annoying, Rex.

    Jonathan Gilbert
     
  9. p.f.moore

    Joined:
    May 30, 2008
    Messages:
    122
    Likes Received:
    1

Share This Page