From: unruh@invalid.ca   
      
   On 2017-02-21, Sidney_Kotic wrote:   
   > I'd like to keep it as hands off as possible. I'm dealing with about 12,000   
   > files in 1,100 directories.   
   >   
   > I can produce a list of file names to copy. But I have no assurances that   
   two,   
   > or more, of them will be named the same thing.   
      
   Produce the list, and put it into a file. Now sort it on the basename of   
   the files to see what the duplicates are, and place them into a new   
   file. Strip out the name which have a ", ', &, or \ in them. and put   
   htem into a separate file which you will handle by hand.   
   On that new file, Place " at the beginning and   
   end of the name. run awk over the sorted file and put in the new directory.   
   so each line looks like   
   "/old/location/and/name" "/new/place/with/name"   
      
   Handle the duplicates.   
   Since they are now together you can see them.   
   PUt cp at the beginning of each line.   
   Now source the file.   
   Done.   
      
      
   Unless you plan on doing this 50 times, an amalgum of human intervantion   
   and scripting is by far the most efficient.   
      
   And you have to do it by hand at least once anyway to figure out what   
   all the pitfalls are in the names anyway.   
      
      
   >   
   > i.e. The result would look like this:   
   >   
   > cp "Music/F/Franz Listz/Complete Symphonic Poems (CD 1)/03-Les Préludes   
   d'après   
   > Alphonse de Lamartine.mp3" "/another device/big pile of music"   
   >   
   > Not that I would expect that to cause a problem.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|