synctoy and diff disagree

M

M$ User

I'm using SyncToy 1.4 on Windows XP to synchronize folders on my hard
drive (NTFS) and flash stick (FAT32). As I am new to SyncToy, I then
use Cygwin's "diff" (gnu implementation) to check the same-ness of the
folders. Diff shows that several Excel file pairs are different. I
am pretty confident that they are the same for the following reasons:

1. Visual inspection

2. Time stamps from Cygwin's "ls --full-time" shows them to be within
2 seconds of one another. The discrepancy is to be expected, as
explained in http://support.microsoft.com/kb/127830.

What could possibly cause the binary file contents to be different?
Cygwin's "cmp" shows that the first differing byte occurs within
several hundred bytes of the end or beginning of the file (files range
in size from about 13KB to 21KB).

As a possibly related question that might shed light on the above, in
a minority of the differing file pairs, the file on the flash stick
has exactly the same time stamp as the one on the hard drive. This is
apparently impossible, since FAT32 has a time resolution of 2s
seconds. Why might this be?

Thank you for any insight or inkling you may have regarding these two
questions.

This has been posted to alt.os.windows-xp, comp.unix.questions, and at
a later time to microsoft.public.windowsxp.general.
 
M

M$ User

M$ User said:
I'm using SyncToy 1.4 on Windows XP to synchronize folders on my hard
drive (NTFS) and flash stick (FAT32). As I am new to SyncToy, I then
use Cygwin's "diff" (gnu implementation) to check the same-ness of the
folders. Diff shows that several Excel file pairs are different. I
am pretty confident that they are the same for the following reasons:

1. Visual inspection

2. Time stamps from Cygwin's "ls --full-time" shows them to be within
2 seconds of one another. The discrepancy is to be expected, as
explained in http://support.microsoft.com/kb/127830.

What could possibly cause the binary file contents to be different?
Cygwin's "cmp" shows that the first differing byte occurs within
several hundred bytes of the end or beginning of the file (files range
in size from about 13KB to 21KB).

As a possibly related question that might shed light on the above, in
a minority of the differing file pairs, the file on the flash stick
has exactly the same time stamp as the one on the hard drive. This is
apparently impossible, since FAT32 has a time resolution of 2s
seconds. Why might this be?

Thank you for any insight or inkling you may have regarding these two
questions.

This has been posted to alt.os.windows-xp, comp.unix.questions, and at
a later time to microsoft.public.windowsxp.general.


Get a second opinion from the 'fc' ('doze) command.

A test on one of the problem file pairs shows several byte
discrepancies, the first of which starts at the same location as that
flagged by "cmp". This confirms that the 2 files are not identical,
though the reason for such a difference after a sych'ing is still
unknown.
 
F

frodo

you can set synctoy to "check file contents", this does a more complete
check of "sameness", tho slower. Try that and see if it cures your issue.
w/o that setting I assume it just checks date/time/size to check for
sameness.

also, the type of sync you're doing may have an effect, there are 5
choices, review them carefully and choose the appropriate one for what you
are doing.
 
F

frodo

oh, diff and fc both have a text or binary comparison mode, that may
account for the diff.
 
M

M$ User

M$ User said:
I'm using SyncToy 1.4 on Windows XP to synchronize folders on my
hard drive (NTFS) and flash stick (FAT32). As I am new to SyncToy,
I then use Cygwin's "diff" (gnu implementation) to check the
same-ness of the folders. Diff shows that several Excel file pairs
are different. I am pretty confident that they are the same for the
following reasons:

1. Visual inspection

2. Time stamps from Cygwin's "ls --full-time" shows them to be
within 2 seconds of one another. The discrepancy is to be expected,
as explained in http://support.microsoft.com/kb/127830.

What could possibly cause the binary file contents to be different?
Cygwin's "cmp" shows that the first differing byte occurs within
several hundred bytes of the end or beginning of the file (files
range in size from about 13KB to 21KB).

As a possibly related question that might shed light on the above,
in a minority of the differing file pairs, the file on the flash
stick has exactly the same time stamp as the one on the hard drive.
This is apparently impossible, since FAT32 has a time resolution of
2 seconds. Why might this be?

Thank you for any insight or inkling you may have regarding these
two questions.

This has been posted to alt.os.windows-xp, comp.unix.questions, and
at a later time to microsoft.public.windowsxp.general.

A test [with DOS's fc] on one of the problem file pairs shows
several byte discrepancies, the first of which starts at the same
location as that flagged by "cmp". This confirms that the 2 files
are not identical, though the reason for such a difference after a
sych'ing is still unknown.

you can set synctoy to "check file contents", this does a more
complete check of "sameness", tho slower. Try that and see if it
cures your issue. w/o that setting I assume it just checks
date/time/size to check for sameness.

Yes, from reading the help for "check file contents" and playing
around with it, that feature uses a broader condition to check when
files differ. This did in fact cause the differing file pairs to show
up as such in SyncToy's scan. The ensuing update caused the
differences to disappear, as determined by SyncToy, unix tools diff &
cmp, and DOS's fc.

This is a big step toward solving the problem. There is still,
however, a big piece of the puzzle that is missing. The file pairs
that differed previously had attributes such as time stamps and sizes
that were identical (with the exception that the time stamps may be
upto 2 seconds off because of coarse resolution of the FAT32 flash
stick). This means that those files were copied from the hard drive
to the stick, which means that there should not be any differences in
content at all. The "check file contents" seems to only explain why
file content differences might not detected; it doesn't seem to
explain why file differences get created in the update process.

Unfortunately, "check file contents" also changes the usability of
SyncToy quite a bit, since it takes so much longer.
also, the type of sync you're doing may have an effect, there are 5
choices, review them carefully and choose the appropriate one for
what you are doing.

I am using "synchronize", which ostensibly does most of what I want.

oh, diff and fc both have a text or binary comparison mode, that may
account for the diff.

Yes, I tried those modes. The differences still persist (prior to
using "check file contents".

Thanks for your suggestions, Frodo. It sheds a bit more light on the
nature of the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top