Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Only God can make random selections.


computers / alt.comp.os.windows-10 / Re: List of NOT duplicate files

SubjectAuthor
* List of NOT duplicate filesNeil
+- Re: List of NOT duplicate filesAlan Browne
+- Re: List of NOT duplicate filesAlan Browne
+* Re: List of NOT duplicate filesHerbert Kleebauer
|`* Re: List of NOT duplicate filesNeil
| `* Re: List of NOT duplicate filesHerbert Kleebauer
|  `- Re: List of NOT duplicate filesNeil
+- Re: List of NOT duplicate filesNewyana2
+- Re: List of NOT duplicate filesPhilip Herlihy
+* Re: List of NOT duplicate filesMr. Man-wai Chang
|`* Re: List of NOT duplicate filesNeil
| `* Re: List of NOT duplicate filesZaidy036
|  +- Re: List of NOT duplicate filesGraham J
|  `- Re: List of NOT duplicate filesknuttle
`* Re: List of NOT duplicate filesBig Al
 `* Re: List of NOT duplicate fileswasbit
  `- Re: List of NOT duplicate filesBig Al

1
List of NOT duplicate files

<tul7ug$36gq8$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: nei...@myplaceofwork.com (Neil)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: List of NOT duplicate files
Date: Sun, 12 Mar 2023 15:08:13 -0400
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <tul7ug$36gq8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 12 Mar 2023 19:08:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a50130110c4c001dd7e17bbc7a7232bd";
logging-data="3359560"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AELVtjVSw25/8KtIhBeMS"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2
Cancel-Lock: sha1:lFnXqWWlS/bineiAs6AtljYWLTU=
Content-Language: en-US
 by: Neil - Sun, 12 Mar 2023 19:08 UTC

I've been doing this manually but I'm asking if there is a better way.

I have two folders of text files, some of which have duplicate file names.
The _contents_ of those text files, even with the same name, are different.
But everything is dependent only on the file names (not on their contents).

Folder A is the master folder containing thousands of A\*.txt files.
Folder B is the folder whose new files (only!) are added to folder A.

That is, if a B\*.txt file name is already in folder A, it's not added.
Only if a B\*.txt file name is NOT already in folder A, is it added.
Folder A always grows but it never contains a duplicate file name from B.

What I need is a list of the files that were in folder B that were not
duplicates of what was already in folder A when they were copied/moved.

Is there an easy way to obtain that list which is better than how I'm
manually doing it today, which is to make a list of what file names are
originally in A and I make a list of the file names in B that are left
after I copy/move the files over without duplication and then I subtract
one list from the other.

Is there an easier way to get that list of what file names are in
folder B that aren't yet in folder A when I move just those files over?
--
best regards,

Neil

Re: List of NOT duplicate files

<WEpPL.337352$PXw7.8197@fx45.iad>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx45.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.8.0
Subject: Re: List of NOT duplicate files
Content-Language: en-US
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
References: <tul7ug$36gq8$1@dont-email.me>
From: bitbuc...@blackhole.com (Alan Browne)
In-Reply-To: <tul7ug$36gq8$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 74
Message-ID: <WEpPL.337352$PXw7.8197@fx45.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sun, 12 Mar 2023 19:23:34 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sun, 12 Mar 2023 15:23:34 -0400
X-Received-Bytes: 3922
 by: Alan Browne - Sun, 12 Mar 2023 19:23 UTC

On 2023-03-12 15:08, Neil wrote:
>
> I have two folders of text files, some of which have duplicate file names.
> The _contents_ of those text files, even with the same name, are different.
> But everything is dependent only on the file names (not on their contents).
>
> Folder A is the master folder containing thousands of A\*.txt files.
> Folder B is the folder whose new files (only!) are added to folder A.
>
> That is, if a B\*.txt file name is already in folder A, it's not added.
> Only if a B\*.txt file name is NOT already in folder A, is it added.
> Folder A always grows but it never contains a duplicate file name from B.
>
> What I need is a list of the files that were in folder B that were not
> duplicates of what was already in folder A when they were copied/moved.
>
> Is there an easy way to obtain that list which is better than how I'm
> manually doing it today, which is to make a list of what file names are
> originally in A and I make a list of the file names in B that are left
> after I copy/move the files over without duplication and then I subtract
> one list from the other.
>
> Is there an easier way to get that list of what file names are in folder
> B that aren't yet in folder A when I move just those files over?

Being lazy, I just pasted everything above into ChatGPT. It immediately
output the following. Note that I'm not a Python programmer, so can't
vouch for this. In particular I'm not sure if it differences files with
the same name but different content.

ChatGPT:
==================================
Yes, there are several ways to obtain the list of files in folder B that
are not duplicates of what's already in folder A. One way is to use a
scripting language like Python to compare the file names in folder A and
folder B and identify the files in folder B that are not already in
folder A. Here's an example Python script that does this:

python
Copy code
import os

folderA = 'path/to/folderA'
folderB = 'path/to/folderB'

filesA = set(os.listdir(folderA))
filesB = set(os.listdir(folderB))

newFiles = filesB - filesA

print(newFiles)
This script uses the os module to get a list of files in folder A and
folder B, and then creates sets of the file names. It then subtracts the
set of files in folder A from the set of files in folder B to get a set
of new files. The newFiles set contains the names of the files in folder
B that are not already in folder A.

You can modify the folderA and folderB variables to point to the actual
paths of your folders. You can save the script as a .py file and run it
in a Python environment, or you can run it from the command line using
python script.py.

This is just one example of how to solve the problem, and there are many
other ways to approach it depending on your specific requirements and
preferences.
==================================

--
“Donald Trump and his allies and supporters are a clear and present
danger to American democracy.”
- J Michael Luttig - 2022-06-16
- Former US appellate court judge (R) testifying to the January 6
committee

Re: List of NOT duplicate files

<2LpPL.292030$Ldj8.190030@fx47.iad>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx47.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:102.0)
Gecko/20100101 Thunderbird/102.8.0
Subject: Re: List of NOT duplicate files
Content-Language: en-US
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
References: <tul7ug$36gq8$1@dont-email.me>
From: bitbuc...@blackhole.com (Alan Browne)
In-Reply-To: <tul7ug$36gq8$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 78
Message-ID: <2LpPL.292030$Ldj8.190030@fx47.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sun, 12 Mar 2023 19:30:06 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sun, 12 Mar 2023 15:30:05 -0400
X-Received-Bytes: 3863
 by: Alan Browne - Sun, 12 Mar 2023 19:30 UTC

On 2023-03-12 15:08, Neil wrote:
> I've been doing this manually but I'm asking if there is a better way.
>
> I have two folders of text files, some of which have duplicate file names.
> The _contents_ of those text files, even with the same name, are different.
> But everything is dependent only on the file names (not on their contents).
>
> Folder A is the master folder containing thousands of A\*.txt files.
> Folder B is the folder whose new files (only!) are added to folder A.
>
> That is, if a B\*.txt file name is already in folder A, it's not added.
> Only if a B\*.txt file name is NOT already in folder A, is it added.
> Folder A always grows but it never contains a duplicate file name from B.
>
> What I need is a list of the files that were in folder B that were not
> duplicates of what was already in folder A when they were copied/moved.
>
> Is there an easy way to obtain that list which is better than how I'm
> manually doing it today, which is to make a list of what file names are
> originally in A and I make a list of the file names in B that are left
> after I copy/move the files over without duplication and then I subtract
> one list from the other.
>
> Is there an easier way to get that list of what file names are in folder
> B that aren't yet in folder A when I move just those files over?

....
So, then I asked ChatGPT to be sure it accounted for the case of the
same name, but different content;

ChatGPT:
==================================
No, the script I provided only checks for new files based on their
filename, so it doesn't take into account the contents of the files.

If you want to check for new files based on both their filename and
contents, you can modify the script to read the contents of each file
and compare them before deciding whether to add the file to folder A or
not. Here's an example of how you can do this in Python:

import os
import filecmp
import shutil

folderA = 'path/to/folderA'
folderB = 'path/to/folderB'

# Get a list of file names in folder A
filesA = os.listdir(folderA)

# Iterate over each file in folder B
for fileB in os.listdir(folderB):
# Check if the file already exists in folder A
if fileB in filesA:
# If the file already exists, compare the contents
if not filecmp.cmp(os.path.join(folderA, fileB),
os.path.join(folderB, fileB), shallow=False):
# If the contents are different, copy the file to folder A
with a unique name
shutil.copy2(os.path.join(folderB, fileB),
os.path.join(folderA, fileB + '_new'))
else:
# If the file doesn't exist in folder A, copy it over
shutil.copy2(os.path.join(folderB, fileB),
os.path.join(folderA, fileB))
==================================

Which may be better. Please give it a go!

--
“Donald Trump and his allies and supporters are a clear and present
danger to American democracy.”
- J Michael Luttig - 2022-06-16
- Former US appellate court judge (R) testifying to the January 6
committee

Re: List of NOT duplicate files

<tula1e$36qeh$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: kle...@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Sun, 12 Mar 2023 20:43:43 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <tula1e$36qeh$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 12 Mar 2023 19:43:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e394160f1082d05e883706eceb05e987";
logging-data="3369425"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/fbUkoB5fOwevGzuZ6t3oVLIjHzGqbhnM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Cancel-Lock: sha1:6ChBG+V+7CkYwIHAV+bkDYI89As=
Content-Language: en-US
In-Reply-To: <tul7ug$36gq8$1@dont-email.me>
 by: Herbert Kleebauer - Sun, 12 Mar 2023 19:43 UTC

On 12.03.2023 20:08, Neil wrote:
> I've been doing this manually but I'm asking if there is a better way.
>
> I have two folders of text files, some of which have duplicate file names.
> The _contents_ of those text files, even with the same name, are different.
> But everything is dependent only on the file names (not on their contents).
>
> Folder A is the master folder containing thousands of A\*.txt files.
> Folder B is the folder whose new files (only!) are added to folder A.
>
> That is, if a B\*.txt file name is already in folder A, it's not added.
> Only if a B\*.txt file name is NOT already in folder A, is it added.
> Folder A always grows but it never contains a duplicate file name from B.
>
> What I need is a list of the files that were in folder B that were not
> duplicates of what was already in folder A when they were copied/moved.
>
> Is there an easy way to obtain that list which is better than how I'm
> manually doing it today, which is to make a list of what file names are
> originally in A and I make a list of the file names in B that are left
> after I copy/move the files over without duplication and then I subtract
> one list from the other.
>
> Is there an easier way to get that list of what file names are in
> folder B that aren't yet in folder A when I move just those files over?

When in directory b use this command (double the % if used in a batch program):

for %i in (*.txt) do if not exist ..\a\%i copy %i ..\a\

Maybe you want to use "move" instead of "copy"

But maybe the simplest way is to use file explorer and copy all
files of b/ to a/ and select don't replace existing files.

Re: List of NOT duplicate files

<tulbd3$26qaj$1@paganini.bofh.team>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!paganini.bofh.team!not-for-mail
From: Newya...@invalid.nospam (Newyana2)
Newsgroups: alt.comp.os.windows-10
Subject: Re: List of NOT duplicate files
Date: Sun, 12 Mar 2023 16:06:37 -0400
Organization: To protect and to server
Lines: 96
Message-ID: <tulbd3$26qaj$1@paganini.bofh.team>
References: <tul7ug$36gq8$1@dont-email.me>
Injection-Date: Sun, 12 Mar 2023 20:06:59 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="2320723"; posting-host="YqKngTRkOayeCX1S/e7lbw.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Cancel-Lock: sha256:fXCEMnyLLg6oAX7lnxgLb9bcbCuizfV0GHGzcGAWfJE=
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-Notice: Filtered by postfilter v. 0.9.3
 by: Newyana2 - Sun, 12 Mar 2023 20:06 UTC

"Neil" <neil@myplaceofwork.com> wrote

| I have two folders of text files, some of which have duplicate file names.
| The _contents_ of those text files, even with the same name, are
different.
| But everything is dependent only on the file names (not on their
contents).
| | Folder A is the master folder containing thousands of A\*.txt files.
| Folder B is the folder whose new files (only!) are added to folder A.

You say you want to copy over all from B to A if the same
file name doesn't already exist in A... even if the file content
doesn't match? The following is what I use. Save to .vbs. Drop
source folder on the script, fill in destination folder, and the script
will do what you ask, recurdssing subfolders. Watch out for wordwrap.

Dim FSO, arg, sPath, sFol1, sFol2, s, TS
Set FSO = CreateObject("Scripting.FileSystemObject")

On Error Resume Next
If WScript.Arguments.count > 0 Then
sPath = WScript.Arguments.item(0)
Else
sPath = InputBox("Enter Path of folder", "Folders-Files to copy")
End If

If sPath = "" Then WScript.Quit
If FSO.FolderExists(sPath) = False Then
MsgBox "Not a valid folder path.", 64
WScript.Quit
End If

sFol2 = InputBox("Enter path of destination folder", "Copy files to...")
If sFol2 = "" Then WScript.Quit
If FSO.FolderExists(sFol2) = False Then
MsgBox "Path not valid.", 64
WScript.Quit
End If

s = CopyNew(sPath, sFol2)

If s <> "" Then
Set TS = FSO.CreateTextFile("C:\FilesCopied.txt", True)
TS.Write s
TS.close
Set TS = Nothing
MsgBox "Done. Copied list is C:\FilesCopied.txt."
Else
MsgBox "Done. No files to copy."
End If

Function CopyNew(FolPath, Fol2)
Dim oFol, Fols, Fils, oFol1, oFil, sList, SubPath, s1, sPath2, Fol2Min
On Error Resume Next
Fol2Min = Fol2
If Right(Fol2Min, 1) = "\" Then Fol2Min = Left(Fol2Min, len(Fol2Min) -
1)
If FSO.FolderExists(Fol2Min) = False Then 'make sure destination folder
exists.
Set oFol1 = FSO.CreateFolder(Fol2Min)
Set oFol1 = Nothing
End If

Set oFol = FSO.GetFolder(FolPath)
If Right(Fol2Min, 1) <> "\" Then Fol2Min = Fol2Min & "\"

Set Fils = oFol.Files
For Each oFil in Fils
If FSO.FileExists(Fol2Min & oFil.Name) = False Then
FSO.CopyFile oFil.Path, Fol2Min & oFil.Name, True
sList = sList & oFil.Path & vbCrLf & " -> " & Fol2Min &
oFil.Name & vbCrLf
End If
Next

'--Run the same routine For subfolders:

Set Fols = oFol.SubFolders
If Fols.count > 0 Then
For Each oFol1 in Fols
SubPath = oFol1.Path
sPath2 = Fol2Min & oFol1.Name & "\"
s1 = CopyNew(SubPath, sPath2)
sList = sList & s1
Next
End If
Set Fols = Nothing

Set Fils = Nothing
Set oFol = Nothing

CopyNew = sList
End Function

Re: List of NOT duplicate files

<MPG.3e791b64b3352fdb989a53@news.eternal-september.org>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: PhillipH...@SlashDevNull.invalid (Philip Herlihy)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Mon, 13 Mar 2023 11:38:02 -0000
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <MPG.3e791b64b3352fdb989a53@news.eternal-september.org>
References: <tul7ug$36gq8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="ecbae9b27c76fd1d9aa9198128a404bd";
logging-data="3941468"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vHxdJVpcTeTRlEJsfReeL4OSpVKKLz8s="
User-Agent: MicroPlanet-Gravity/3.0.10 (GRC)
Cancel-Lock: sha1:fGKSZqDHNl/V6qnQB3HltwanEbU=
 by: Philip Herlihy - Mon, 13 Mar 2023 11:38 UTC

In article <tul7ug$36gq8$1@dont-email.me>, Neil wrote...
>
> I've been doing this manually but I'm asking if there is a better way.
>
> I have two folders of text files, some of which have duplicate file names.
> The _contents_ of those text files, even with the same name, are different.
> But everything is dependent only on the file names (not on their contents).
>
> Folder A is the master folder containing thousands of A\*.txt files.
> Folder B is the folder whose new files (only!) are added to folder A.
>
> That is, if a B\*.txt file name is already in folder A, it's not added.
> Only if a B\*.txt file name is NOT already in folder A, is it added.
> Folder A always grows but it never contains a duplicate file name from B.
>
> What I need is a list of the files that were in folder B that were not
> duplicates of what was already in folder A when they were copied/moved.
>
> Is there an easy way to obtain that list which is better than how I'm
> manually doing it today, which is to make a list of what file names are
> originally in A and I make a list of the file names in B that are left
> after I copy/move the files over without duplication and then I subtract
> one list from the other.
>
> Is there an easier way to get that list of what file names are in
> folder B that aren't yet in folder A when I move just those files over?

Robocopy (built-in to all recent versions of Windows) can do this. It takes
work to get to a basic competence with it, but it's so useful that it's well
worth it. There's a guide out there (Google Robocopy.doc) or type robocopy /?
into a command window. There are a LOT of command options!

Essentially robocopy <folder1> <folder2> will _selectively_ copy files from 1
to 2, only if they are newer or otherwise different. Exactly how it chooses
this is controlled by the options. Usefully, the /L option does all the
calculations but doesn't move anything. Dangerously, the /MIR option deletes
anything in the target folder that wasn't found in the source folder.

The way I often use it is to navigate in a command window to my desktop, so job
files (described below) and log files are readily seen there. I run:
robocopy <f1> <f2> <options, including /L> /SAVE:jobfile.rcj /QUIT
This creates a "job file" which can be re-run with this syntax:
robocopy /JOB:jobfile.rcj
You then edit the jobfile (double-colon comments out a line) to fool around
with the options, studying the output (you can usefully create a /LOG file and
/TEE the output to the command window). When you're confident you have it
right, you remove the /L and the files get moved next time.

In your situation, you should pay particular attention to the file "classes":
Newer, Different, Older, etc, etc. Robocopy will elegantly do exactly what you
want. It's a utility I only occasionally use, but when I do it's absolutely
invaluable.

--

Phil, London

Re: List of NOT duplicate files

<tunb39$3ps4v$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: nei...@myplaceofwork.com (Neil)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Mon, 13 Mar 2023 10:14:15 -0400
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <tunb39$3ps4v$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me> <tula1e$36qeh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Mar 2023 14:14:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b7a129badf611f2003610d35c95ec44";
logging-data="3993759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18K+WY+UslfcUbMZUznzJlx"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2
Cancel-Lock: sha1:EMw3TRbCpBiT/E4Jy8G5al5gWfw=
Content-Language: en-US
 by: Neil - Mon, 13 Mar 2023 14:14 UTC

On 3/13/2023 1:13 AM, Herbert Kleebauer wrote:
>> Is there an easier way to get that list of what file names are in
>> folder B that aren't yet in folder A when I move just those files over?
>
> When in directory b use this command (double the % if used in a batch program):
>
> for %i in (*.txt) do if not exist ..\a\%i copy %i ..\a\
>
> Maybe you want to use "move" instead of "copy"
>
> But maybe the simplest way is to use file explorer and copy all
> files of b/ to a/ and select don't replace existing files.

I should have been clear that I can easily copy (or move) the files
selectively because the native Windows command has an overwrite yes/no.

What I need is a separate _list_ of what was moved (or copied) over.
for %i in (*.txt) do if not exist ..\a\%i copy %i ..\a\
echo %i > list.txt

What I do now is compare time stamps of the resulting combined folder.
But sometimes the time stamps aren't what I would have thought they'd be.
--
best regards,

Neil

Re: List of NOT duplicate files

<tunhn0$3r3rb$1@toylet.eternal-september.org>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!toylet.eternal-september.org!.POSTED!not-for-mail
From: toylet.t...@gmail.com (Mr. Man-wai Chang)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Tue, 14 Mar 2023 00:06:51 +0800
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <tunhn0$3r3rb$1@toylet.eternal-september.org>
References: <tul7ug$36gq8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Mar 2023 16:06:56 -0000 (UTC)
Injection-Info: toylet.eternal-september.org; posting-host="3645c5d1cd826bb521b7745ccccd54f9";
logging-data="4034411"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xqcCKqKHfxDnjyJsOpjhA"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:EKp/8YQK1i0uQp3SP5V3n4L8vi4=
In-Reply-To: <tul7ug$36gq8$1@dont-email.me>
Content-Language: en-US
 by: Mr. Man-wai Chang - Mon, 13 Mar 2023 16:06 UTC

On 3/13/2023 3:08 AM, Neil wrote:
>
> List of NOT duplicate files
>

"NOT duplicate"" = Unique? :)

Re: List of NOT duplicate files

<tunlso$3rtfi$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: kle...@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Mon, 13 Mar 2023 18:18:16 +0100
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <tunlso$3rtfi$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me> <tula1e$36qeh$1@dont-email.me>
<tunb39$3ps4v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Mar 2023 17:18:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a0bc954403cd4167333e3fd29926e528";
logging-data="4060658"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vb84plUwNQKSPCy6kFY6of2PVqooAV5M="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Cancel-Lock: sha1:slgIFu+xm6EYll2OjLM88GhevSU=
In-Reply-To: <tunb39$3ps4v$1@dont-email.me>
Content-Language: de-DE, en-US
 by: Herbert Kleebauer - Mon, 13 Mar 2023 17:18 UTC

On 13.03.2023 15:14, Neil wrote:
> On 3/13/2023 1:13 AM, Herbert Kleebauer wrote:
>>> Is there an easier way to get that list of what file names are in
>>> folder B that aren't yet in folder A when I move just those files over?
>>
>> When in directory b use this command (double the % if used in a batch program):
>>
>> for %i in (*.txt) do if not exist ..\a\%i copy %i ..\a\
>>
>> Maybe you want to use "move" instead of "copy"
>>
>> But maybe the simplest way is to use file explorer and copy all
>> files of b/ to a/ and select don't replace existing files.
>
> I should have been clear that I can easily copy (or move) the files
> selectively because the native Windows command has an overwrite yes/no.
>
> What I need is a separate _list_ of what was moved (or copied) over.
> for %i in (*.txt) do if not exist ..\a\%i copy %i ..\a\
> echo %i > list.txt
>
> What I do now is compare time stamps of the resulting combined folder.
> But sometimes the time stamps aren't what I would have thought they'd be.

You just answered your own question (but don't use the name
"list.txt" or it will also be listed as new text file):
While in directory b\ enter at the command prompt (but first
delete new.log if it already exists):

for %i in (*.txt) do if not exist ..\a\%i echo %i>>new.log

Or make a batch file which first changes the working
directory to b\, deletes new.log if it already exists
and then executes the above line (but double any %).
Then it doesn't matter where the batch is located and
you can start it with a double click with the mouse.

Re: List of NOT duplicate files

<tunlva$3rtpe$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: nei...@myplaceofwork.com (Neil)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Mon, 13 Mar 2023 13:19:52 -0400
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <tunlva$3rtpe$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me> <tunhn0$3r3rb$1@toylet.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Mar 2023 17:19:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b7a129badf611f2003610d35c95ec44";
logging-data="4060974"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+TiaY1jivUiLnChPIiPNBN"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2
Cancel-Lock: sha1:0LKtbNT9ZM2uwxL8XBXHd2JlIuU=
Content-Language: en-US
 by: Neil - Mon, 13 Mar 2023 17:19 UTC

On 3/13/2023 4:06 PM, Mr. Man-wai Chang wrote:
> On 3/13/2023 3:08 AM, Neil wrote:
>>
>> List of NOT duplicate files
>>
>
> "NOT duplicate"" = Unique? :)

It doesn't really matter what the contents of the files are.

I only brought up the contents being different because a dumb move wouldn't
work because that would overwrite files of the same name in A with the new
contents of another file of the same name from B.

A is the master folder.

B is just the new files (some of which may have the same name and hence
would be discarded).

I should also be clear the copy (or move) isn't the problem because Windows
already won't copy over the file in A if it has the same name as in B.

What I'm after is the _list_ of files that were copied (or moved) over from
B to A (those are all going to be file names which were not in A prior).

Kind of like this pseudish code snip
cd B
for %i in (*.txt) do if not exist ..\a\%i copy %i ..\A\
echo %i >> list_of_file_names_in_b_not_in_a.txt

I don't even need to do the copy/move because that's the easy part.
The hard part for me is getting a list of file names in B not already in A.
--
best regards,

Neil

Re: List of NOT duplicate files

<tuo082$3r4sq$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Zaidy...@air.isp.spam (Zaidy036)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Mon, 13 Mar 2023 16:14:58 -0400
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <tuo082$3r4sq$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me>
<tunhn0$3r3rb$1@toylet.eternal-september.org> <tunlva$3rtpe$1@dont-email.me>
Reply-To: Zaidy036@air.isp.spam
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Mar 2023 20:14:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5045e8444d3b9f8d967e60eee7d54603";
logging-data="4035482"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183/O68QAFxZvIsE+QVmi0FxuejEq0eaO4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Cancel-Lock: sha1:lrsA7mqVngIwjppDN+3/4bLLELI=
Content-Language: en-US
In-Reply-To: <tunlva$3rtpe$1@dont-email.me>
 by: Zaidy036 - Mon, 13 Mar 2023 20:14 UTC

On 3/13/2023 1:19 PM, Neil wrote:
> On 3/13/2023 4:06 PM, Mr. Man-wai Chang wrote:
>> On 3/13/2023 3:08 AM, Neil wrote:
>>>
>>> List of NOT duplicate files
>>>
>>
>> "NOT duplicate"" = Unique? :)
>
> It doesn't really matter what the contents of the files are.
>
> I only brought up the contents being different because a dumb move wouldn't
> work because that would overwrite files of the same name in A with the new
> contents of another file of the same name from B.
>
> A is the master folder.
>
> B is just the new files (some of which may have the same name and hence
> would be discarded).
>
> I should also be clear the copy (or move) isn't the problem because Windows
> already won't copy over the file in A if it has the same name as in B.
>
> What I'm after is the _list_ of files that were copied (or moved) over from
> B to A (those are all going to be file names which were not in A prior).
>
> Kind of like this pseudish code snip
> cd B
> for %i in (*.txt) do if not exist ..\a\%i copy %i ..\A\
> echo %i >> list_of_file_names_in_b_not_in_a.txt
>
> I don't even need to do the copy/move because that's the easy part.
> The hard part for me is getting a list of file names in B not already in A.
A list of file names in a folder:
DIR /B <full path folderA> > X:\FolderA.txt
where X: is a full path and not required if same folder as folderA

So make a batch:
1. Make FolderA.txt
2. Make FolderB.txt
3. FOR /f %%A in ('DIR /A:D /B "FolderB.txt" ^| FIND /V /C ""') DO SET
cnt=%%A
4. Make a loop:
FOR /L %%f IN (1,1,%cnt%) DO (
SET /P _Fname=<FolderB.txt
IF EXIST %<full path folderA>%\!_Fname! echo !_Fname!>> X:\FolderC.txt
MORE +1 FolderB.txt
)
FolderC will contain file names from FolderB that are also in FolderA

Re: List of NOT duplicate files

<tuo23a$3u0ie$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: nob...@nowhere.co.uk (Graham J)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Mon, 13 Mar 2023 20:46:33 +0000
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <tuo23a$3u0ie$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me>
<tunhn0$3r3rb$1@toylet.eternal-september.org> <tunlva$3rtpe$1@dont-email.me>
<tuo082$3r4sq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Mar 2023 20:46:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c146f4cace718329b05eab5f387726db";
logging-data="4129358"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191ABHnuYaNK+GLa4eb/7mo"
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.15
Cancel-Lock: sha1:aG2+h/wBOiJnplMO/JI+bQplt7o=
X-Antivirus-Status: Clean
In-Reply-To: <tuo082$3r4sq$1@dont-email.me>
X-Antivirus: AVG (VPS 230312-4, 12/3/2023), Outbound message
 by: Graham J - Mon, 13 Mar 2023 20:46 UTC

Zaidy036 wrote:

Robocopy will do what you want.

Use its logging feature, and it will report the files it copies.

--
Graham J

Re: List of NOT duplicate files

<tuo244$3u0eq$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: keith_nu...@yahoo.com (knuttle)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Mon, 13 Mar 2023 16:47:00 -0400
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <tuo244$3u0eq$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me>
<tunhn0$3r3rb$1@toylet.eternal-september.org> <tunlva$3rtpe$1@dont-email.me>
<tuo082$3r4sq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Mon, 13 Mar 2023 20:47:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="456ac43995de2eadc037bba83688b77e";
logging-data="4129242"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yCyWuLZCqD00EcLFzGrak"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Cancel-Lock: sha1:bPbVdieBOIONZUliE+2yNWnHWxk=
Content-Language: en-US
In-Reply-To: <tuo082$3r4sq$1@dont-email.me>
 by: knuttle - Mon, 13 Mar 2023 20:47 UTC

On 3/13/2023 4:14 PM, Zaidy036 wrote:
> On 3/13/2023 1:19 PM, Neil wrote:
>> On 3/13/2023 4:06 PM, Mr. Man-wai Chang wrote:
>>> On 3/13/2023 3:08 AM, Neil wrote:
>>>>
>>>> List of NOT duplicate files
>>>>
>>>
>>> "NOT duplicate"" = Unique? :)
>>
>> It doesn't really matter what the contents of the files are.
>>
>> I only brought up the contents being different because a dumb move
>> wouldn't
>> work because that would overwrite files of the same name in A with the
>> new
>> contents of another file of the same name from B.
>>
>> A is the master folder.
>>
>> B is just the new files (some of which may have the same name and hence
>> would be discarded).
>>
>> I should also be clear the copy (or move) isn't the problem because
>> Windows
>> already won't copy over the file in A if it has the same name as in B.
>>
>> What I'm after is the _list_ of files that were copied (or moved) over
>> from
>> B to A (those are all going to be file names which were not in A prior).
>>
>> Kind of like this pseudish code snip
>> cd B
>> for %i in (*.txt) do if not exist ..\a\%i copy %i ..\A\
>> echo %i >> list_of_file_names_in_b_not_in_a.txt
>>
>> I don't even need to do the copy/move because that's the easy part.
>> The hard part for me is getting a list of file names in B not already
>> in A.
> A list of file names in a folder:
> DIR /B <full path folderA> > X:\FolderA.txt
> where X: is a full path and not required if same folder as folderA
>
> So make a batch:
> 1. Make FolderA.txt
> 2. Make FolderB.txt
> 3. FOR /f %%A in ('DIR /A:D /B "FolderB.txt" ^| FIND /V /C ""') DO SET
> cnt=%%A
> 4. Make a loop:
>    FOR /L %%f IN (1,1,%cnt%) DO (
>    SET /P _Fname=<FolderB.txt
>    IF EXIST %<full path folderA>%\!_Fname! echo !_Fname!>> X:\FolderC.txt
>    MORE +1 FolderB.txt
>    )
> FolderC will contain file names from FolderB that are also in FolderA
>
There is another way that is not elegant.
Run the following Batch file in each directory
Dir *.* /s >text.txt
Open the first text file in column A of the spreadsheet and sort the column
open the second text file in Column C of the spreadsheet and sort that
column. You may need to open the second text file in another spreadsheet
and copy it to column C of the first spreadsheet.
enter A1=C1 into all of the cells in Column B,
Start at the top and every time you see a 0, in column B, make what ever
adjustments are necessary in Columns A or C to make the cells equal
again A1=C1 is 1 you may need to copy the cell in Column B down to the
bottom, depending how you make the adjustment.
When Column B has all 1, you have identical date in the cells in rows A
and C.
I find I can compare the two data sets using this method faster that I
can create and debug an scripts or commands.

Re: List of NOT duplicate files

<tuogum$gt8$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: nei...@myplaceofwork.com (Neil)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Mon, 13 Mar 2023 21:00:20 -0400
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <tuogum$gt8$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me> <tula1e$36qeh$1@dont-email.me> <tunb39$3ps4v$1@dont-email.me> <tunlso$3rtfi$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Mar 2023 01:00:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="72a0bfdf9680c8dd5f4bbdede509d8b8";
logging-data="17320"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OIKPk3MM3MovmWIRiCyGP"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2
Cancel-Lock: sha1:ZK7wSHs7xc6aAObINy6OtN/3kvo=
Content-Language: en-US
 by: Neil - Tue, 14 Mar 2023 01:00 UTC

Herbert Kleebauer wrote:

>> What I do now is compare time stamps of the resulting combined folder.
>> But sometimes the time stamps aren't what I would have thought they'd be.
>
> You just answered your own question (but don't use the name
> "list.txt" or it will also be listed as new text file):
> While in directory b\ enter at the command prompt (but first
> delete new.log if it already exists):
>
> for %i in (*.txt) do if not exist ..\a\%i echo %i>>new.log
>
> Or make a batch file which first changes the working
> directory to b\, deletes new.log if it already exists
> and then executes the above line (but double any %).
> Then it doesn't matter where the batch is located and
> you can start it with a double click with the mouse.

Thank you for a way to diff list file names that are in B but not A.
cd B
for %i in (*.txt) do if not exist C:\path\to\A\%i echo %i >> new.log

To which I added the copy I had been using with my manually created diff.
cd B
echo "No" | copy/-Y *.txt C:\path\to\A\

I like that your copy command also copied what's in B not already in A.
cd B
for %i in (*.txt) do if not exist C:\path\to\A\%i copy %i C:\path\to\A\

To explain what I was doing before you provided that nice diff listing
and diff batch copy commands, and using the names for that diff file that
are in this thread...

Before, what I was doing was _manually_ creating the diff file on my own.
And then I was editing that diff file to create a new.bat on my own.
vim new.log
:%s/.*/echo n | copy & C\:\\path\\to\\A\\&
:w! new.bat

The explanation of that is ":" starts a command inside of vim.
The "%" says to run the command on every line of the file.
The "s/.*" says search for any character & then zero or any number of them.
The "/" means to replace what that search found with what comes next.
Next is what to replace it with (the ampersand being what was found).
The extra backslashes are to escape characters which have other meanings.

Where the resulting new.bat file contained the respective copy commands:
echo n | copy file1.txt C:\path\to\A\file1.txt
echo n | copy file2.txt C:\path\to\A\file2.txt
echo n | copy file3.txt C:\path\to\A\file3.txt

But your method is more elegant than my manual editing of the diff file
to turn that diff file of what's in B not yet in A into a batch copy file.

@echo off
cd C:\path\to\B
for %%i in (*.txt) do if not exist C:\path\to\A\%%i echo %%i >> new.log
for %%i in (*.txt) do if not exist C:\path\to\A\%%i copy %%i C:\path\to\A\

Thank you!
--
best regards,

Neil

Re: List of NOT duplicate files

<tupq1m$b3cb$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Bea...@invalid.com (Big Al)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Tue, 14 Mar 2023 08:41:25 -0400
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <tupq1m$b3cb$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Mar 2023 12:41:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48c3a1ca8ae40452bec831a14f18cff6";
logging-data="363915"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7VbnYfm24jZWvUl2OXe0yI3iZ/EFA7e4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Cancel-Lock: sha1:7PPyxSKCMKUegN9WNDRo99ENEyc=
Content-Language: en-US
In-Reply-To: <tul7ug$36gq8$1@dont-email.me>
 by: Big Al - Tue, 14 Mar 2023 12:41 UTC

On 3/12/23 15:08, this is what Neil wrote:
> I've been doing this manually but I'm asking if there is a better way.
>
> I have two folders of text files, some of which have duplicate file names.
> The _contents_ of those text files, even with the same name, are different.
> But everything is dependent only on the file names (not on their contents).
>
> Folder A is the master folder containing thousands of A\*.txt files.
> Folder B is the folder whose new files (only!) are added to folder A.
>
> That is, if a B\*.txt file name is already in folder A, it's not added.
> Only if a B\*.txt file name is NOT already in folder A, is it added.
> Folder A always grows but it never contains a duplicate file name from B.
>
> What I need is a list of the files that were in folder B that were not
> duplicates of what was already in folder A when they were copied/moved.
>
> Is there an easy way to obtain that list which is better than how I'm
> manually doing it today, which is to make a list of what file names are
> originally in A and I make a list of the file names in B that are left
> after I copy/move the files over without duplication and then I subtract
> one list from the other.
>
> Is there an easier way to get that list of what file names are in folder B that aren't yet in folder A when I move just
> those files over?
You might use meld.
meld <folder A> <folder B>
It will highlight all the files that are not in A. Also it will highlight all the files that are in both but the text
in them is diff.

--
Al

Re: List of NOT duplicate files

<tus3le$qqvr$1@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: was...@nowhere.com (wasbit)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Wed, 15 Mar 2023 09:37:49 +0000
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <tus3le$qqvr$1@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me> <tupq1m$b3cb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 15 Mar 2023 09:37:50 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="6643713e99e01265fb41a24d4c818402";
logging-data="879611"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0HvmRRFOilkuiISEXWbZQ"
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:5.0) Aura/20220608
Interlink/52.9.8194
Cancel-Lock: sha1:Il/MlXgG+wUAVGmqRy6U+Ayi3Y0=
In-Reply-To: <tupq1m$b3cb$1@dont-email.me>
Content-Language: en-US
 by: wasbit - Wed, 15 Mar 2023 09:37 UTC

On 14/03/2023 12:41, Big Al wrote:
> On 3/12/23 15:08, this is what Neil wrote:
>> I've been doing this manually but I'm asking if there is a better way.
>>
>> I have two folders of text files, some of which have duplicate file
>> names.
>> The _contents_ of those text files, even with the same name, are
>> different.
>> But everything is dependent only on the file names (not on their
>> contents).
>>
>> Folder A is the master folder containing thousands of A\*.txt files.
>> Folder B is the folder whose new files (only!) are added to folder A.
>>
>> That is, if a B\*.txt file name is already in folder A, it's not added.
>> Only if a B\*.txt file name is NOT already in folder A, is it added.
>> Folder A always grows but it never contains a duplicate file name from B.
>>
>> What I need is a list of the files that were in folder B that were not
>> duplicates of what was already in folder A when they were copied/moved.
>>
>> Is there an easy way to obtain that list which is better than how I'm
>> manually doing it today, which is to make a list of what file names are
>> originally in A and I make a list of the file names in B that are left
>> after I copy/move the files over without duplication and then I subtract
>> one list from the other.
>>
>> Is there an easier way to get that list of what file names are in
>> folder B that aren't yet in folder A when I move just those files over?
> You might use meld.
> meld <folder A> <folder B>
> It will highlight all the files that are not in A.  Also it will
> highlight all the files that are in both but the text in them is diff.
>

Presume you mean
- http://meldmerge.org/

-
Regards
wasbit

Re: List of NOT duplicate files

<tusd5l$sd5h$2@dont-email.me>

 copy mid

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

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Bea...@invalid.com (Big Al)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: List of NOT duplicate files
Date: Wed, 15 Mar 2023 08:20:05 -0400
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <tusd5l$sd5h$2@dont-email.me>
References: <tul7ug$36gq8$1@dont-email.me> <tupq1m$b3cb$1@dont-email.me>
<tus3le$qqvr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 15 Mar 2023 12:20:05 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="2ff405267afeda3236c4330cf1af36de";
logging-data="930993"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186BeBagMUU130R5t23yGbtU6eA0seT6NM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Cancel-Lock: sha1:c91Ol6b1knMNbeal0G9ImzG7Nls=
In-Reply-To: <tus3le$qqvr$1@dont-email.me>
Content-Language: en-US
 by: Big Al - Wed, 15 Mar 2023 12:20 UTC

On 3/15/23 05:37, this is what wasbit wrote:
> On 14/03/2023 12:41, Big Al wrote:
>> On 3/12/23 15:08, this is what Neil wrote:
>>> I've been doing this manually but I'm asking if there is a better way.
>>>
>>> I have two folders of text files, some of which have duplicate file names.
>>> The _contents_ of those text files, even with the same name, are different.
>>> But everything is dependent only on the file names (not on their contents).
>>>
>>> Folder A is the master folder containing thousands of A\*.txt files.
>>> Folder B is the folder whose new files (only!) are added to folder A.
>>>
>>> That is, if a B\*.txt file name is already in folder A, it's not added.
>>> Only if a B\*.txt file name is NOT already in folder A, is it added.
>>> Folder A always grows but it never contains a duplicate file name from B.
>>>
>>> What I need is a list of the files that were in folder B that were not
>>> duplicates of what was already in folder A when they were copied/moved.
>>>
>>> Is there an easy way to obtain that list which is better than how I'm
>>> manually doing it today, which is to make a list of what file names are
>>> originally in A and I make a list of the file names in B that are left
>>> after I copy/move the files over without duplication and then I subtract
>>> one list from the other.
>>>
>>> Is there an easier way to get that list of what file names are in folder B that aren't yet in folder A when I move
>>> just those files over?
>> You might use meld.
>> meld <folder A> <folder B>
>> It will highlight all the files that are not in A.  Also it will highlight all the files that are in both but the text
>> in them is diff.
>>
>
> Presume you mean
>  - http://meldmerge.org/
>
>   -
> Regards
> wasbit
Yes.
--
Al

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor