Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

HELP!!!! I'm being held prisoner in /usr/games/lib!


computers / alt.comp.os.windows-11 / Re: robocopy missin option?

SubjectAuthor
* robocopy missin option?Stan Brown
+* robocopy missin option?Jack
|+* robocopy missin option?Graham J
||`* robocopy missin option?Stan Brown
|| `* robocopy missin option?Paul
||  `* robocopy missin option?Stan Brown
||   `- robocopy missin option?Paul
|`- robocopy missin option?Graham J
`* robocopy missin option?Uwe Sieber
 `* robocopy missin option?Stan Brown
  `* robocopy missin option?Uwe Sieber
   `- robocopy missin option?Mimi

1
robocopy missin option?

<MPG.3f9ec3076ea843ab9901ea@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3139&group=alt.comp.os.windows-11#3139

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!news.furie.org.uk!pasdenom.info!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-11
Subject: robocopy missin option?
Date: Sun, 22 Oct 2023 06:27:08 -0700
Organization: Oak Road Systems
Lines: 20
Message-ID: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net DUovczuIbM2C/ACqJc/1jwByOkwEp9f8KgjvGMyxyjMgZfPhQ6
Cancel-Lock: sha1:B8oC2i1dB7FJQZRpLEWAFgNledQ= sha256:MS7F+ZsCKaI9r2a1tCfve7pUqTGkTc74axAR/CcjM0Q=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Sun, 22 Oct 2023 13:27 UTC

Robocopy has lots of options, heaven knows, but it's
missing one I want: don't copy when files are
identical, even if one has a later timestamp.

This arises when I'm copying some particular
subdirectories of %APPDATA% to my USB stick for
synching with my other Windows computer. A number of
programs seem to write out their settings when they
exit, even if there were no changes, and I'd prefer not
to copy a file over a duplicate of itself.

Hopefully there's a way to do this, and I just missed
it in the documentation.

--
Stan Brown, Tehachapi, California, USA
https://BrownMath.com/
Shikata ga nai...

Re: robocopy missin option?

<uh3coe$u5si$1@paganini.bofh.team>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3142&group=alt.comp.os.windows-11#3142

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!paganini.bofh.team!not-for-mail
From: inva...@invalid.net (Jack)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Sun, 22 Oct 2023 14:47:17 +0000
Organization: To protect and to server
Message-ID: <uh3coe$u5si$1@paganini.bofh.team>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
Mime-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 14:48:46 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="989074"; posting-host="lvwnlrZOTyXOUFTBTyWy3g.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Cancel-Lock: sha256:ThfPTFoubFl7Wor34j5cDcOdQxjfiCxE5jScUgG4uwo=
X-Notice: Filtered by postfilter v. 0.9.3
Content-Language: en-US
 by: Jack - Sun, 22 Oct 2023 14:47 UTC

On 22/10/2023 14:27, Stan Brown wrote:
> Robocopy has lots of options, heaven knows, but it's
> missing one I want: don't copy when files are
> identical, even if one has a later timestamp.
>
> This arises when I'm copying some particular
> subdirectories of %APPDATA% to my USB stick for
> synching with my other Windows computer. A number of
> programs seem to write out their settings when they
> exit, even if there were no changes, and I'd prefer not
> to copy a file over a duplicate of itself.
>
> Hopefully there's a way to do this, and I just missed
> it in the documentation.
>
>
"robocopy /xc /xn /xo source destination "

e.g.
robocopy /xc /xn /xo %APPDATA% e:\tmp

Re: robocopy missin option?

<uh3j3p$2hfpo$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3143&group=alt.comp.os.windows-11#3143

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nob...@nowhere.co.uk (Graham J)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Sun, 22 Oct 2023 17:37:03 +0100
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <uh3j3p$2hfpo$1@dont-email.me>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
<uh3coe$u5si$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 16:37:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="02342cf43fb17a35b3cab1fb90edd518";
logging-data="2670392"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/SJPbuwFOwNTCQJjJolih6"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:TVGdRGaumqZCLVw2u0/F6U0YZJ8=
In-Reply-To: <uh3coe$u5si$1@paganini.bofh.team>
X-Antivirus-Status: Clean
X-Antivirus: AVG (VPS 231022-2, 22/10/2023), Outbound message
 by: Graham J - Sun, 22 Oct 2023 16:37 UTC

Jack wrote:
> On 22/10/2023 14:27, Stan Brown wrote:
>> Robocopy has lots of options, heaven knows, but it's
>> missing one I want: don't copy when files are
>> identical, even if one has a later timestamp.
>>
>> This arises when I'm copying some particular
>> subdirectories of %APPDATA% to my USB stick for
>> synching with my other Windows computer. A number of
>> programs seem to write out their settings when they
>> exit, even if there were no changes, and I'd prefer not
>> to copy a file over a duplicate of itself.
>>
>> Hopefully there's a way to do this, and I just missed
>> it in the documentation.
>>
>>
> "robocopy /xc /xn /xo source destination"
>
> e.g.
> robocopy /xc /xn /xo %APPDATA% e:\tmp
>

But the switch /XC :: eXclude Changed files

The OP wants "eXclude Unchanged files" - which is the default, except
that they might have different timestamps, which then means they get copied.

Perhaps use "/XO : Exclude Older" and "/XN : Exclude Newer" together.

Personally, I would worry about a program's settings always being the
same from one computer to another, so would prefer to identify the
settings file type and exclude it. So perhaps:

\XF *.INI

.... to exclude all files of the form *.INI

I'm not sure how Robocopy identifies whether one file is the same as
another. I think it is matching name, size and datestamp. Clearly it
would be possible to generate two files with these paramaeter matching,
but different content. Not sure any WIndows filesystem stores a
checksum of every file ???

--
Graham J

Re: robocopy missin option?

<uh3j8d$2hga5$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3144&group=alt.comp.os.windows-11#3144

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nob...@nowhere.co.uk (Graham J)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Sun, 22 Oct 2023 17:39:33 +0100
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <uh3j8d$2hga5$1@dont-email.me>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
<uh3coe$u5si$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 16:39:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="02342cf43fb17a35b3cab1fb90edd518";
logging-data="2670917"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19861ZVrlxd2IuZ0KLbdnJs"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
Cancel-Lock: sha1:Sh9BNQI1uXMmdOkDLLqehJPsLKo=
X-Antivirus-Status: Clean
X-Antivirus: AVG (VPS 231022-2, 22/10/2023), Outbound message
X-Mozilla-News-Host: news://news.eternal-september.org
In-Reply-To: <uh3coe$u5si$1@paganini.bofh.team>
 by: Graham J - Sun, 22 Oct 2023 16:39 UTC

Jack wrote:
> On 22/10/2023 14:27, Stan Brown wrote:
>> Robocopy has lots of options, heaven knows, but it's
>> missing one I want: don't copy when files are
>> identical, even if one has a later timestamp.
>>
>> This arises when I'm copying some particular
>> subdirectories of %APPDATA% to my USB stick for
>> synching with my other Windows computer. A number of
>> programs seem to write out their settings when they
>> exit, even if there were no changes, and I'd prefer not
>> to copy a file over a duplicate of itself.
>>
>> Hopefully there's a way to do this, and I just missed
>> it in the documentation.
>>
>>
> "robocopy /xc /xn /xo source destination"
>
> e.g.
> robocopy /xc /xn /xo %APPDATA% e:\tmp
>

But the switch /XC :: eXclude Changed files

The OP wants "eXclude Unchanged files" - which is the default, except
that they might have different timestamps, which then means they get copied.

Perhaps use "/XO : Exclude Older" and "/XN : Exclude Newer" together.

Personally, I would worry about a program's settings always being the
same from one computer to another, so would prefer to identify the
settings file type and exclude it. So perhaps:

\XF *.INI

.... to exclude all files of the form *.INI

I'm not sure how Robocopy identifies whether one file is the same as
another. I think it is matching name, size and datestamp. Clearly it
would be possible to generate two files with these paramaeter matching,
but different content. Not sure any WIndows filesystem stores a
checksum of every file ???

--
Graham J

Re: robocopy missin option?

<MPG.3f9f3254b55295569901ea@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3149&group=alt.comp.os.windows-11#3149

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Sun, 22 Oct 2023 14:21:58 -0700
Organization: Oak Road Systems
Lines: 56
Message-ID: <MPG.3f9f3254b55295569901ea@news.individual.net>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net> <uh3coe$u5si$1@paganini.bofh.team> <uh3j3p$2hfpo$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net pRD/1LalXUfwQskDIgWjgwiMkkSnpMtdG+nC1m7i23IKbdmurG
Cancel-Lock: sha1:GQFjM46r21Z/Wzc+EYsCSDJ1K78= sha256:Yrj4/JZS2aR017S5FSE43oHcJf484WrSMQj5hhPfKL8=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Sun, 22 Oct 2023 21:21 UTC

On Sun, 22 Oct 2023 17:37:03 +0100, Graham J wrote:
>
> Jack wrote:
> > On 22/10/2023 14:27, Stan Brown wrote:
> >> Robocopy has lots of options, heaven knows, but it's
> >> missing one I want: don't copy when files are
> >> identical, even if one has a later timestamp.
> >>
> > "robocopy /xc /xn /xo source destination"
> >
> > e.g.
> > robocopy /xc /xn /xo %APPDATA% e:\tmp
> >
>
> But the switch /XC :: eXclude Changed files
>
> The OP wants "eXclude Unchanged files" - which is the default, except
> that they might have different timestamps, which then means they get copied.

"Changed files" in the Robocopy documentation are files
with the same source and destination timestamp but
different file sizes. It's hard for me to see any
process that could cause such files to exist, but in
any case that's not what I'm talking about.

> Perhaps use "/XO : Exclude Older" and "/XN : Exclude Newer" together.

I'm already using /XO, which excludes files where
source timestamp is older than destination timestamp. I
really don't think I want /XN, to exclude all files
where the source is newer than the destination. I want
to exclude a _subset_ of newer, the subset where the
source and destination files are identical even though
the source's timestamp is newer.

> Personally, I would worry about a program's settings always being the
> same from one computer to another,

That's a valid point. I distinguish between subfolders
of %APPDATA% where I do want to keep all settings in
sync and those where I do not. For the latter, I copy
them to a folder on the USB stick whose name has
%COMPUTERNAME% appended.

> I'm not sure how Robocopy identifies whether one file is the same as
> another. I think it is matching name, size and datestamp. Clearly it
> would be possible to generate two files with these paramaeter matching,
> but different content. Not sure any WIndows filesystem stores a
> checksum of every file ???

That's what I was wondering too.

--
Stan Brown, Tehachapi, California, USA
https://BrownMath.com/
Shikata ga nai...

Re: robocopy missin option?

<uh4auk$2n4ms$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3154&group=alt.comp.os.windows-11#3154

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@needed.invalid (Paul)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Sun, 22 Oct 2023 19:24:03 -0400
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <uh4auk$2n4ms$1@dont-email.me>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
<uh3coe$u5si$1@paganini.bofh.team> <uh3j3p$2hfpo$1@dont-email.me>
<MPG.3f9f3254b55295569901ea@news.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 23:24:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="743441f778d9bccf712b150d460397ab";
logging-data="2855644"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BSIwfBWvPfThquLT190tK6OJ/R+D62BE="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:LJW+uITxvfXzdatqWgGLoOcSf0E=
In-Reply-To: <MPG.3f9f3254b55295569901ea@news.individual.net>
Content-Language: en-US
 by: Paul - Sun, 22 Oct 2023 23:24 UTC

On 10/22/2023 5:21 PM, Stan Brown wrote:
> On Sun, 22 Oct 2023 17:37:03 +0100, Graham J wrote:
>>
>> Jack wrote:
>>> On 22/10/2023 14:27, Stan Brown wrote:
>>>> Robocopy has lots of options, heaven knows, but it's
>>>> missing one I want: don't copy when files are
>>>> identical, even if one has a later timestamp.
>>>>
>>> "robocopy /xc /xn /xo source destination"
>>>
>>> e.g.
>>> robocopy /xc /xn /xo %APPDATA% e:\tmp
>>>
>>
>> But the switch /XC :: eXclude Changed files
>>
>> The OP wants "eXclude Unchanged files" - which is the default, except
>> that they might have different timestamps, which then means they get copied.
>
> "Changed files" in the Robocopy documentation are files
> with the same source and destination timestamp but
> different file sizes. It's hard for me to see any
> process that could cause such files to exist, but in
> any case that's not what I'm talking about.
>
>> Perhaps use "/XO : Exclude Older" and "/XN : Exclude Newer" together.
>
> I'm already using /XO, which excludes files where
> source timestamp is older than destination timestamp. I
> really don't think I want /XN, to exclude all files
> where the source is newer than the destination. I want
> to exclude a _subset_ of newer, the subset where the
> source and destination files are identical even though
> the source's timestamp is newer.
>
>> Personally, I would worry about a program's settings always being the
>> same from one computer to another,
>
> That's a valid point. I distinguish between subfolders
> of %APPDATA% where I do want to keep all settings in
> sync and those where I do not. For the latter, I copy
> them to a folder on the USB stick whose name has
> %COMPUTERNAME% appended.
>
>> I'm not sure how Robocopy identifies whether one file is the same as
>> another. I think it is matching name, size and datestamp. Clearly it
>> would be possible to generate two files with these paramaeter matching,
>> but different content. Not sure any WIndows filesystem stores a
>> checksum of every file ???
>
> That's what I was wondering too.
>

The OS doesn't keep checksums at the logical file layer.

The drive keeps checksums at the sector (physical layer),
and can do error correction in response. On an SSD for example,
there is a 512 byte sector, and there are 51 bytes of syndrome
for usage in computing corrections to the 512 bytes. Which is
very large, compared to the Fire polynomial syndrome the
old hard drives used. The Fire polynominal could only correct
a few random one-bit errors.

Generating checksums at the file level, is a slow process.

The hashdeep/md5deep program, will generate checksums for an
entire disk if you want. Minus the sections of the disk having
permission problems (even for Administrator).

If Robocopy does not have the requires semantics, then a
"sync program" should be used in its place. A "sync program"
doing the extra work, of generating checksums as it goes.

Paul

Re: robocopy missin option?

<MPG.3f9f851614a067659901ed@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3164&group=alt.comp.os.windows-11#3164

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!paganini.bofh.team!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Sun, 22 Oct 2023 20:15:03 -0700
Organization: Oak Road Systems
Lines: 53
Message-ID: <MPG.3f9f851614a067659901ed@news.individual.net>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net> <uh3coe$u5si$1@paganini.bofh.team> <uh3j3p$2hfpo$1@dont-email.me> <MPG.3f9f3254b55295569901ea@news.individual.net> <uh4auk$2n4ms$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net ADVLvS+GfjiglIKyY4sBSwbxBRUVLqYwDpNTn6lw0TF2lF7Eec
Cancel-Lock: sha1:/V2FUmaJ8gHt1H4b+isdOoGjcj8= sha256:4wX3PMkEujZ5GI3nNuqAaAa4tckI9xrxqa0tadiPM1E=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Mon, 23 Oct 2023 03:15 UTC

On Sun, 22 Oct 2023 19:24:03 -0400, Paul wrote:
>
> On 10/22/2023 5:21 PM, Stan Brown wrote:
> > On Sun, 22 Oct 2023 17:37:03 +0100, Graham J wrote:
> >> I'm not sure how Robocopy identifies whether one file is the same as
> >> another. I think it is matching name, size and datestamp. Clearly it
> >> would be possible to generate two files with these paramaeter matching,
> >> but different content. Not sure any WIndows filesystem stores a
> >> checksum of every file ???
> >
> > That's what I was wondering too.
> >
>
> The OS doesn't keep checksums at the logical file layer.
>
> The drive keeps checksums at the sector (physical layer),
> and can do error correction in response. On an SSD for example,
> there is a 512 byte sector, and there are 51 bytes of syndrome
> for usage in computing corrections to the 512 bytes. Which is
> very large, compared to the Fire polynomial syndrome the
> old hard drives used. The Fire polynominal could only correct
> a few random one-bit errors.
>
> Generating checksums at the file level, is a slow process.
>
> The hashdeep/md5deep program, will generate checksums for an
> entire disk if you want. Minus the sections of the disk having
> permission problems (even for Administrator).
>
> If Robocopy does not have the requires semantics, then a
> "sync program" should be used in its place. A "sync program"
> doing the extra work, of generating checksums as it goes.

Well, TCCLE (which I use instead of CMD.EXE) fas a function to
compute CRC32 at the file level. It seems to go pretty fast. I'll
either build that into my synching batch file, or just decide to live
with the unnecessary copies. We're not talking about massive files,
or many of them: maybe a dozen, most around 1 KB or less.

P.S. I googled MD5 versus CRC32 before posting, and an article in
stackoverflow explained that CRC32 was the thing to use if you want
to know if two files are different.

<https://stackoverflow.com/questions/16122067/md5-vs-crc32-which-
ones-better-for-common-use>

"If you want to check if two files are the same, CRC32 checksum is
the way to go because it's faster than MD5. But be careful: CRC only
reliably tells you if the binaries are different; it doesn't tell you
if they're identical."
--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...

Re: robocopy missin option?

<kpmll9Fae4iU1@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3168&group=alt.comp.os.windows-11#3168

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!nntp.comgw.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: mai...@uwe-sieber.de (Uwe Sieber)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Mon, 23 Oct 2023 09:13:59 +0200
Lines: 27
Message-ID: <kpmll9Fae4iU1@mid.individual.net>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net ijyyAYy3p/w84KRVwUlXMg2R5kjI5wxhPU04/oJVq8ssYyzA==
Cancel-Lock: sha1:1VsQ4evrwBkkH4gDwEJ8xbWgilU= sha256:lqtOjNOfQ1kWLvvXmh3yFjb54RXrYeXdVP2lJbY/DWs=
In-Reply-To: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
 by: Uwe Sieber - Mon, 23 Oct 2023 07:13 UTC

Stan Brown wrote:
> Robocopy has lots of options, heaven knows, but it's
> missing one I want: don't copy when files are
> identical, even if one has a later timestamp.
>
> This arises when I'm copying some particular
> subdirectories of %APPDATA% to my USB stick for
> synching with my other Windows computer. A number of
> programs seem to write out their settings when they
> exit, even if there were no changes, and I'd prefer not
> to copy a file over a duplicate of itself.
>
> Hopefully there's a way to do this, and I just missed
> it in the documentation.

To do so source and target file must be read and compared
and the target written only if a difference was found.
Robocopy has no such feature yet.

My FFC (Fast File Copy) has -u (avoid unnecessary writes)
for that but lacks lots of Robocopy's features.

https://www.uwe-sieber.de/filetools_e.html

Uwe

Re: robocopy missin option?

<uh5h39$32i2v$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3172&group=alt.comp.os.windows-11#3172

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!nntp.comgw.net!paganini.bofh.team!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@needed.invalid (Paul)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Mon, 23 Oct 2023 06:15:04 -0400
Organization: A noiseless patient Spider
Lines: 101
Message-ID: <uh5h39$32i2v$1@dont-email.me>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
<uh3coe$u5si$1@paganini.bofh.team> <uh3j3p$2hfpo$1@dont-email.me>
<MPG.3f9f3254b55295569901ea@news.individual.net>
<uh4auk$2n4ms$1@dont-email.me>
<MPG.3f9f851614a067659901ed@news.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 23 Oct 2023 10:15:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="743441f778d9bccf712b150d460397ab";
logging-data="3229791"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/f+wzXn/kYVEw1kvjPyCocar3X2f3AkOY="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:FkkItrwPWReqa+I6xwzQ8PjHF88=
In-Reply-To: <MPG.3f9f851614a067659901ed@news.individual.net>
Content-Language: en-US
 by: Paul - Mon, 23 Oct 2023 10:15 UTC

On 10/22/2023 11:15 PM, Stan Brown wrote:
> On Sun, 22 Oct 2023 19:24:03 -0400, Paul wrote:
>>
>> On 10/22/2023 5:21 PM, Stan Brown wrote:
>>> On Sun, 22 Oct 2023 17:37:03 +0100, Graham J wrote:
>>>> I'm not sure how Robocopy identifies whether one file is the same as
>>>> another. I think it is matching name, size and datestamp. Clearly it
>>>> would be possible to generate two files with these paramaeter matching,
>>>> but different content. Not sure any WIndows filesystem stores a
>>>> checksum of every file ???
>>>
>>> That's what I was wondering too.
>>>
>>
>> The OS doesn't keep checksums at the logical file layer.
>>
>> The drive keeps checksums at the sector (physical layer),
>> and can do error correction in response. On an SSD for example,
>> there is a 512 byte sector, and there are 51 bytes of syndrome
>> for usage in computing corrections to the 512 bytes. Which is
>> very large, compared to the Fire polynomial syndrome the
>> old hard drives used. The Fire polynominal could only correct
>> a few random one-bit errors.
>>
>> Generating checksums at the file level, is a slow process.
>>
>> The hashdeep/md5deep program, will generate checksums for an
>> entire disk if you want. Minus the sections of the disk having
>> permission problems (even for Administrator).
>>
>> If Robocopy does not have the requires semantics, then a
>> "sync program" should be used in its place. A "sync program"
>> doing the extra work, of generating checksums as it goes.
>
> Well, TCCLE (which I use instead of CMD.EXE) fas a function to
> compute CRC32 at the file level. It seems to go pretty fast. I'll
> either build that into my synching batch file, or just decide to live
> with the unnecessary copies. We're not talking about massive files,
> or many of them: maybe a dozen, most around 1 KB or less.
>
> P.S. I googled MD5 versus CRC32 before posting, and an article in
> stackoverflow explained that CRC32 was the thing to use if you want
> to know if two files are different.
>
> <https://stackoverflow.com/questions/16122067/md5-vs-crc32-which-
> ones-better-for-common-use>
>
> "If you want to check if two files are the same, CRC32 checksum is
> the way to go because it's faster than MD5. But be careful: CRC only
> reliably tells you if the binaries are different; it doesn't tell you
> if they're identical."
>

The characteristics of CRC32, do not prevent collisions.

I tried to get the original paper, when I was at work, but
the inter-library loan system would not give it to me. It claimed
the info was "military classified". I think that was just someone
being lazy.

All I could determine at the time I was using CRCs for hardware
design, is above a certain message size, the collision resistance
is a fixed finite amount, and unsuited to every purpose. Maybe it
would buy you three orders of magnitude better performance, on a wire,
with retries as part of the protocol. We used CRC32, for an experimental
device that used "very large packets". I did the CRC32 in hardware
(not with a processor), and it was running at wire-speed as a result.
The implementation would seem a joke today (it's just parallel CRC
with look-up tables for speed, in high speed OTP ROMs).

As you go up the food chain, things improve. Better hash, means
lower probability of collisions.

MD5 is no good for authentication, but it is good for hashing.
It's the fastest one you could reasonably use. You can hack a source
file, to create the same MD5 output value, using a Pentium 4,
in 60-90 seconds or so. If someone wants a file to have the same
MD5, it is easy to hack. But if the project does not involve
"opponents" or "tripwire", MD5 is fine for casual usage. Like
while syncing files, it would be fine for that.

SHA1 doesn't have that problem. At least, that we know of. We have
gone further up the food chain, in an attempt to keep it that way.

You can use whatever hash calc you want, until the calc is slower
than the drive. Since 7ZIP has these in the menu, I can easily test them.

CRC32 2410 MB/sec
CRC64 1627 MB/sec
SHA1 771 MB/sec
SHA256 393 MB/sec (the basis of Bitcoin)

Since a good NVMe can go faster than that, you want to be using
hashdeep, because you can set -j 8 kind of thing, and have
eight threads of execution, and do a better job of soaking up
available bandwidth.

If hashing a HDD, you don't want to smother it in seeks, so -j 1
might be a better policy in that case.

Paul

Re: robocopy missin option?

<MPG.3fa31fd93b8389739901f6@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3215&group=alt.comp.os.windows-11#3215

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!news.neodome.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Wed, 25 Oct 2023 13:52:12 -0700
Organization: Oak Road Systems
Lines: 43
Message-ID: <MPG.3fa31fd93b8389739901f6@news.individual.net>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net> <kpmll9Fae4iU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net cMeDubIVdY8mM+28KSECKw/S4P+pr9H667HuGmJWi4YvQeHBUj
Cancel-Lock: sha1:lweDdnMFB1KgpKOlCjTyoEus0fw= sha256:D/TBkgPiTuRXGzqYqKL44F/2XXZd9sfKxGaBfQRV3E4=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Wed, 25 Oct 2023 20:52 UTC

On Mon, 23 Oct 2023 09:13:59 +0200, Uwe Sieber wrote:
>
> Stan Brown wrote:
> > Robocopy has lots of options, heaven knows, but it's
> > missing one I want: don't copy when files are
> > identical, even if one has a later timestamp.
> >
> > This arises when I'm copying some particular
> > subdirectories of %APPDATA% to my USB stick for
> > synching with my other Windows computer. A number of
> > programs seem to write out their settings when they
> > exit, even if there were no changes, and I'd prefer not
> > to copy a file over a duplicate of itself.
> >
> > Hopefully there's a way to do this, and I just missed
> > it in the documentation.
>
> To do so source and target file must be read and compared
> and the target written only if a difference was found.
> Robocopy has no such feature yet.
>
> My FFC (Fast File Copy) has -u (avoid unnecessary writes)
> for that but lacks lots of Robocopy's features.
>
> https://www.uwe-sieber.de/filetools_e.html

Thanks for posting. I didn't see anything like /XF (exclude files by
name with wildcards) and /XD (exclude directories by name with
wildcards), both of which I need, but I certainly wish Robocopy had
something like your -u option.

You say FFC is optimnized for large fies, so it might not be suitable
anyway for %APPPDATA%, where most of the files are settings files of
about 1 KB or less.

Just a note: the descriptions of -sr and -sw both end in the three
characters \, n, " -- I'm guessing that was not intended?

--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...

Re: robocopy missin option?

<kqs49vFj2dkU1@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3376&group=alt.comp.os.windows-11#3376

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder2.eternal-september.org!eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: mai...@uwe-sieber.de (Uwe Sieber)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Mon, 06 Nov 2023 12:24:52 +0100
Lines: 53
Message-ID: <kqs49vFj2dkU1@mid.individual.net>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net> <kpmll9Fae4iU1@mid.individual.net> <MPG.3fa31fd93b8389739901f6@news.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net hYVrNBAzCm2Ij3yoRuPQRgbZtoTFx0aVmsC1Loe+fflt8YPw==
Cancel-Lock: sha1:5dX3PpXZK1GSLCqpGb0EtZnzy24= sha256:saJ4uZ/TC5Az+tfm6NdgX+umCMv7krifM+jBgSJXi38=
In-Reply-To: <MPG.3fa31fd93b8389739901f6@news.individual.net>
 by: Uwe Sieber - Mon, 6 Nov 2023 11:24 UTC

Stan Brown wrote:
> On Mon, 23 Oct 2023 09:13:59 +0200, Uwe Sieber wrote:
>> Stan Brown wrote:
>>> Robocopy has lots of options, heaven knows, but it's
>>> missing one I want: don't copy when files are
>>> identical, even if one has a later timestamp.
>>>
>>> This arises when I'm copying some particular
>>> subdirectories of %APPDATA% to my USB stick for
>>> synching with my other Windows computer. A number of
>>> programs seem to write out their settings when they
>>> exit, even if there were no changes, and I'd prefer not
>>> to copy a file over a duplicate of itself.
>>>
>>> Hopefully there's a way to do this, and I just missed
>>> it in the documentation.
>> To do so source and target file must be read and compared
>> and the target written only if a difference was found.
>> Robocopy has no such feature yet.
>>
>> My FFC (Fast File Copy) has -u (avoid unnecessary writes)
>> for that but lacks lots of Robocopy's features.
>>
>> https://www.uwe-sieber.de/filetools_e.html
>
> Thanks for posting. I didn't see anything like /XF (exclude files by
> name with wildcards) and /XD (exclude directories by name with
> wildcards), both of which I need, but I certainly wish Robocopy had
> something like your -u option.
>
> You say FFC is optimnized for large fies, so it might not be suitable
> anyway for %APPPDATA%, where most of the files are settings files of
> about 1 KB or less.
>
> Just a note: the descriptions of -sr and -sw both end in the three
> characters \, n, " -- I'm guessing that was not intended?
>

For excluding files there is -e, it has effect on file and folder names.
Making separate params for files and folders but would be easy.

It just bypasses the Windows file cache, so on mechanical disks
it causes lots of head movements. But from my experience a flooded
write cache has a similar effect.

The two \n" came into the FFC.txt by copy+paste from the C-source :-)

Uwe

Re: robocopy missin option?

<uif6ec$36o$1@news.tlt.ru>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=3382&group=alt.comp.os.windows-11#3382

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!usenet.network!news!news.tlt.ru!not-for-mail
From: hae...@wageme.ru.invalid (Mimi)
Newsgroups: alt.comp.os.windows-11
Subject: Re: robocopy missin option?
Date: Wed, 8 Nov 2023 13:30:52 +0800
Organization: InfoLada News Server
Lines: 3
Message-ID: <uif6ec$36o$1@news.tlt.ru>
References: <MPG.3f9ec3076ea843ab9901ea@news.individual.net>
<kpmll9Fae4iU1@mid.individual.net>
<MPG.3fa31fd93b8389739901f6@news.individual.net>
<kqs49vFj2dkU1@mid.individual.net>
NNTP-Posting-Host: 49.192.213.112
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.tlt.ru 1699421453 3288 49.192.213.112 (8 Nov 2023 05:30:53 GMT)
X-Complaints-To: newsmaster@tlt.ru
NNTP-Posting-Date: Wed, 8 Nov 2023 05:30:53 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
In-Reply-To: <kqs49vFj2dkU1@mid.individual.net>
 by: Mimi - Wed, 8 Nov 2023 05:30 UTC

Uwe Sieber wrote:

yaermjy5sks5

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor