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

Suggestions for Compare Folder Tree routine

Discussion in 'Support' started by Charles G, Oct 24, 2013.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,015
    Likes Received:
    0
    Hi,

    I was wondering if anyone already had a script or utility that would escentially copare folder trees, like this:

    CompareTrees /S1=C:\TopFldr1 /S2=D:\Charles\TopFldr2 /D=3 /Delete=Yes /When=Yes /ByByte=Yes /CASE=Yes

    The routine would start for each fies in and under the folder specified by the /S1= parameter would see if the same file existed in the same folder tree starting at the /S2= parameter existed, had the:

    - same date/time (/When=Yes (would check for each YMDHMSD),
    - same file name (/CASE=Yes),
    - and the same contents (either by a byte by bype comparison or the CRC32 vaue,
    - if /Delete=Yes is specified - the file in the S1 tree would be deleted.
    - the /D=3 would make sure the rightmost number of folder names was the same.

    The reason why I would like this is that I use DoubleKillerPro.exe from Big Bang Enterprises but it it does not also compare folder trees - which at times is important to me.
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    I have a routine that does something similar. To compare file bodies, I use TCC's @compare function, which is more efficient in case of mismatch (it stops reading both files at the first mismatch, while any hash function must completely process both files, and has a miniscule probability of a false match), and probably faster even in case of a match - no need to hash. It has the option to iterate through the whole directory (not folder) tree. It reports files only in tree 1, files only in tree 2, files identical in the two trees, and files that differ. Since it is a TCC batch program, operating on Windows file systems, file names and paths are not case sensitive.
     
  3. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,015
    Likes Received:
    0
    thnak you for the reply Steve. I'd be interested in looking at a copy of the routine please.....
     
  4. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    It needs a little clean-up, because currently it assumes that it copies from F: to Z:, with source and target directories named identically - originally intended to back up selected directories from my desktop to my laptop. I myself now want it to work with arbitrary top levels for the source and the target tree.
     
  5. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,015
    Likes Received:
    0
    Please keep me in mind when you get to a SHAREable state.... !!
     
  6. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    I have a time-limited trial download to deal with first.
     

Share This Page