howto do recursive compare if folder names mismatch

howto do recursive compare if folder names mismatch

3
NewbieNewbie
3

    Jun 26, 2006#1

    How can I compare contents of folders recursively if the names of the sub-folders do not match?

    e.g.

    foo
    |
    +--red
    | file1
    |
    +--green
    | file2
    |
    +--blue
    file3

    vs.

    foo_update
    |
    +--rouge-neuf
    | file1
    |
    +--toms-changes-for-blue
    file3

    -----------
    Software:
    UltraCompare Professional Version 4.00a
    Single User License

    6,675585
    Grand MasterGrand Master
    6,675585

      Jun 27, 2006#2

      Is your question a joke?

      How should UltraCompare know which subdirectory of foo_update belongs to which directory of foo? I have never seen a computer program which has the gift of second sight or can really read the thoughts of the user (and hopefully there will be never such a program).

      Rename the subdirectories of foo_update according to the subdirectory names of foo or compare folder by folder.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Jun 27, 2006#3

        No. I asked seriously.
        And, of course, I do not expect the tool to guess which sub-directory may match what other one.
        A simple any-to-any comparison will do.
        And, yes, renaming is what I'm doing at the moment when using IDM's Folder Compare to compare folders. But that's not really feasible for frequent tasks.

        Any other recommendations?

        Thanks in advance.

        6,675585
        Grand MasterGrand Master
        6,675585

          Jun 27, 2006#4

          Aha, the files are unique at both locations. I don't know if you have Total Commander, but here is a possible solution for Windows Explorer.

          Run a search for *.* on directory foo. The Explorer will find all files. Select all with Ctrl+A, press Ctrl+C, create anywhere a temp directory and paste with Ctrl+V all files into 1 directory.

          Redo the procedure above for all files in foo_update with a 2nd temp directory. Then compare the 2 temp directories with all files.

          If you need this often, create a batch file which makes the copies and starts UltraCompare in folder compare mode with the 2 temp directories.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Jun 27, 2006#5

            Thanks Mofi,
            with the two additional temporary directories and all files copied "flat" in there, I see the differences. So that workaround works, and it's easier than aligning the folder's names.

            But, especially for frequent tasks, I'd really expect to do this within Ultra Compare (though I may try your hint for a command line batch script, Mofi).

            I'm actually surprised that UltraCompare seems to lack an intrinsic solution for recursive compare with ignoring sub-folder's names...

            (in my experience, people in a team tend to re-name folders containing their work -- adding a version indicator or just their own names ;-)

            2
            NewbieNewbie
            2

              Feb 09, 2013#6

              I'm new to UltraCompare, and you would have thought it would have solved directory duplicate comparison/differences by now. A way I have used in the past, before buying UltraCompare, was to:

              a) run Karen's Directory Printer on the uppermost directories you want to compare separately, saving the text for each directory with subfolders option ticked to disc using options 'path/file name/size/modified date/md5 hash'. These can be as massive as you like.
              b) run Excel and import the two or more different text directories with tab option and no quote marks round text option. Then sort according to what column (file name, size, md5 hash &c) you wish to find same files. The path name is important because it'll tell you which directory the duplicates are in. This is brilliant but MANUAL and LENGTHY unless you know Excel well enough to find similar files auto-wise, which I don't, yet. Remember when sorting to select all the entries first, then decide which column(s) to sort on: if you don't do this the data will get muddled.

              I have found that UC can't tell you where a file in one directory is in the second. As I sometimes might copy a file out of a sub-folder into another named sub-folder there is no way, apart from the above for bulk comparison, it will do this. Just, boring, use windows search and then use the text compare. But that's almost as tedious as doing what I've just done in the past above.

              Any way round this in more recent editions?

              6,675585
              Grand MasterGrand Master
              6,675585

                Feb 09, 2013#7

                Yes, in the meantime UC offers a feature to find identical files in different folder trees. The feature is named Find Duplicates and is available since UC v8.00. There are lots of options for finding duplicates.

                Read more about this feature on feature page Find Duplicates with UltraCompare Professional and on powertip/tutorial page Find duplicate files between folders with UltraCompare.

                2
                NewbieNewbie
                2

                  Feb 23, 2013#8

                  Thank you for the above on comparing. I've done this, but what I think the duplicate mode lacks (unless I've not accessed another option) but which my Excel/Karen's hasher method allows me to do is to see if there are files which are different as well - at the same time.

                  With the duplicates option in UltraCompare, it only selects those which are similar, obviously. If I just put in for duplicates by name, I'll get those which are different in content with those which are similar. If I chose the content and the name option, again I'll only get those which match. I would need to compare the two lists to work out which were the rogue files by content out of all the named duplicates.

                  Comparing a site folder (not via ftp) which had many many files, to check that the online version matches the generating computer version would mean two lengthy processes to go thru, comparing all those brought up as duplicates by name and then another check to see if any were different by content.