Announcement

Collapse
No announcement yet.

Comparing Flat Folder to Tree-Folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Comparing Flat Folder to Tree-Folder

    I use sync software to 1-way sync my document folder to a WebDav folder.

    But I have a weird usage case which requires a FLAT FILE STRUCTURE on the WebdDav side, so the software strips out the directory structure. (This is accomplished with sync software called Syncovery.)

    However, checking both the local Tree folder and the Flat file WebDav folder, I found different numbers of files (even though the sync software only reported a few naming conflicts, there is a 100+ file discrepancy).

    I have tried Beyond Compare to investigate out of the 3000 or so files which ones are different (not being sync-ed). But it reports that ALL the files in both folders are different (no matches, even though these are the same files)

    I've tested it several times - opening different random files, and have found them to be exactly the same (Windows reported size for instance). The dates modified are different (since the WebDav files have the date of transfer, and the originals have date of creation of last modified).

    1. But I don't think the dates should matter if its doing a binary content comparison?

    2. *** The software DID mark one file as identical on both the WebDav Flat-folder and the Local Tree-Folder. It was a test document I created but saved in the parent folder root, OUTSIDE THE FOLDER TREE. I created another to test this, and it ALSO identified it in both places as THE SAME.

    ---

    3. ***Clearly, something about the process of "flattening" the files changes them. The files in the root directory of the folder being sync-ed report being identical on both sides. But all the files INSIDE a sub-folder, which the sync software then strips out to 'flatten it' are NOT reported as identical by the binary comparison.

    4. I have been told that it might be the case that the subfolder-stripped files are not correctly updated by date. But I was under the impression that binary comparison COMPARED THE CONTENTS of the files, and ignored the dates?

    Is there any explanation for this? And... perhaps, a solution?

  • #2
    Hello,

    If a binary content scan is returning that the files are different, then there is a binary difference between them. This difference may not be visible: it could be a end of line character difference or other binary metadata.

    By default, BC3 only performs a timestamp/size comparison. If the timestamp is different, then the files would be marked as different.

    Viewing the files is similar to running a Rules-based comparison scan, which could be used instead of a Binary scan if these results are acceptable.

    Instead of using Syncovery to flatten the structure, you could use BC3's Copy To Folder command. Use the Edit menu -> Expand All, Edit menu -> Select All Files, then Copy To Folder (removing the folder structure). This could be directly to the destination, or to a 3rd temporary location before you copy over to the server.

    A Binary compare would compare the contents, and by default would override the timestamp/size comparison. This is controlled in the Session Settings, Comparison tab, where Timestamp, Size, and Override Quick Test Results should all be enabled. You would then also enable Binary or Rules-based.

    You can determine what results a content scan returned by looking at the center column between two files, which populates with the specific content scan's results. This column does not populate between folders, only files, so you need to expand subfolders to verify.

    Please let us know if you have any questions.
    Aaron P Scooter Software

    Comment


    • #3
      A bit confused...

      Ok, I'm not sure I'm understanding you exactly.

      1. I think I understand that you're saying the timestamps are in fact, the problem, and that is has nothing to do with the flattening of the folder?

      (I thought it was the flattening part that was creating the problem).


      2. I believe you're suggesting to first strip the folder tree and THEN sync the data, which I've considered, but unfortunately it takes up far too much space since the data winds up stored in triplicate.

      I also require the sync/schedule features of the sync software.


      3. I think I understand how Beyond Compare displays its results; that's not been a problem for me.

      4. If I am understanding you correctly, are you saying that there IS a way to correct this (and basically, get Beyond Compare to correctly identify these files as being the exact same on both sides) as I currently have it?

      OR

      Do I need to do something differently viz. the timestamps/stripping the folder structure, before this will work?

      Thanks

      Comment


      • #4
        Still rather confused...

        Will using BC to flatten the folders fix this issue? Is it able to sync to a webdav folder?

        I'm assuming that the problem is with the timestamp that is not being updated when the files are sent to the webdav server...

        since files OUTSIDE the directory structure are picked up by BC correctly as being binary 'identical' - these dates apparently, get updated correctly when transferred to the server, presumably because the 'flat file' function (reasonably) wasn't coded to ALSO update the timestamp on them (probably since this is a very edge-case)...

        -- While I WOULD like to know if indeed I can fix this, and thusly use BC to detect missing files between a tree-folder and its flat-variant... I'm getting the feeling I'm using an extremely awkward solution... and probably need to rethink it completely...

        Comment


        • #5
          Hello,

          Initially, I did not think that the timestamp was the cause, but it is hard to say without a screenshot showing the center column I mentioned.

          With default settings (Timestamp/Size/Override enabled) with the addition of a Binary scan, if files show as different, it would mean they are Binary different. However, once viewed in the Text Compare, the files might then appear as the same, since viewable data might be equal (while invisible Binary data might be different). To compare all data, you use a Binary scan, but to compare only the visible text you would use a Rules-based scan. Once one of these scans is run, the timestamp does not matter directly, since it is overridden by the Override Quick Test results option (enabled by default).

          My hunch would be that either the Override setting was disabled, or that the content scan is returning that the files are 'different' when you expect them to be the same.

          If you double click to view any files, that runs a Rules-based scan, which replaces any previous scan and updates the center column for that pair of files.

          To get this working for you, we want to use the content scan you expect (probably Rules-based) and have the comparison be configured to return the status you want. This way, the files are compared using the criteria you deem important, and we can then limit the view to only 'different' files using the Display Filters.

          Flattening the folder structure or copying to another location would happen after this.

          If you are having any trouble with this, could we get a full screen screenshot showing a couple of expanded folders and your middle column? If you would like to send it in privately, please email us at [email protected] with a link to this forum thread for our reference.
          Aaron P Scooter Software

          Comment

          Working...
          X