home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 42,133 of 42,547   
   Herbert Kleebauer to Neil   
   Re: List of NOT duplicate files   
   12 Mar 23 20:43:43   
   
   XPost: alt.comp.os.windows-10   
   From: klee@unibwm.de   
      
   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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca