Thread: File comparison
View Single Post
  #4  
Old June 11th 19, 08:39 PM posted to alt.windows7.general,microsoft.public.windowsxp.general
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default File comparison

Miker wrote:
Looking for a way to see if files are missing on a flash drive as
compared to my hard disk folder and then be able to copy to synchronize.

Any good free applications for that ?
Would be nice if it worked on Windows XP but not mandatory.


https://web.archive.org/web/20140818...lesync-review/

http://en.wikipedia.org/wiki/Compari...ation_software

*******

There is also Robocopy.

https://docs.microsoft.com/en-us/pre...28v=msdn.10%29

http://download.microsoft.com/downlo...ght2006_11.exe

Without installing that package, I can just reach in and
pull out a copy of Robocopy.exe XP026.

Name: _54ECED6107F5477E80212C764531DDF6 === rename to robocopy.exe
Size: 212992 bytes
Modified: 2005-11-22 06:14:16

When unpacked with 7ZIP, you get Robocopy XP026 (5.1.2600.26)
This is the checksum of robocopy.exe

SHA1: 58B049C8A7344380FA17CA50E880091126D2E70C

Robocopy is command line based.

It is a "folder copy utility" - it expects folders as objects.

robocopy C:\src D:\dest

It supports various copy disciplines, such as the dangerous /MIR.

With /MIR, the flash stick would be "made to have the same file set".
If you were bringing a file back home on the Flash, and accidentally
ran Robocopy /MIR towards the Flash stick, the "unique" file you
were bringing from work would be erased. In fact

robocopy some-empty-directory D:\dest /MIR

is a pattern used to *erase* the flash stick. By telling the
tool to mirror an empty folder to the flash stick, the
dest folder gets erased.

If you use this, you get the help page.

robocopy /?

You'll notice there is a /S and that /MIR is the
same as /E /PURGE. This implies that /S is "additive"
in a sense, so files at least don't get thrown away,
but similarly named things ("clash"), something
nasty could happen depending on date stamps.

*******

*Don't* use FAT32 on the flash stick when using Sync software.
The datestamps on FAT32 are interpreted in terms of
"Daylight Saving Time". Whereas NTFS is Universal Time,
and not subject to hiccups when DST changes. On a FAT32
situation, the entire flash stick could be rewritten,
because of a "trivial misinterpretation" of the date info.

*******

My personal preference is, I *hate* software which has the
option for automated deletion, because sooner or later, it's
going to kick you in the nads.

I lost 1GB of data, before I could stop one of these.
Lesson learned ? *Don't* copy/paste Robocopy commands
directly into a Command Prompt window. Verify by pasting
the copy buffer into Notepad first, that the copy
buffer contains what you think if contains.

Another issue is drive lettering. For example,
Windows drive letters can "go all over the place on you".
A mapped network drive could be using the same letter
as your USB stick, and a "very nasty mirror operation"
could result, destroying something. Always check check
and recheck, that the drive letters didn't change while
you picked up that cup of coffee.

In any case, this is my "cloner" command used for various
things here, such as "refreshing a hard drive" and
"defragmenting the hard way".

I keep a logfile of *every* usage of Robocopy here. In this
example, I erase drive O: first, ensuring no fragments
and a clean work surface. Thus, my usage of /MIR, doesn't
matter.

robocopy F:\ O:\ /mir /copy:datso /dcopy:t /r:3 /w:2 /zb /np /tee /v /log:robocopy_F_to_O.log

....do some other stuff...

robocopy O:\ F:\ /mir /copy:datso /dcopy:t /r:3 /w:2 /zb /np /tee /v /log:robocopy_O_to_F.log

Now, I can use "mirror" in these examples, because I know
that both destinations will be empty at the time of usage.

I check the summary table on each log, to see whether
the file counts are roughly the same.

Paul
Ads