Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.suse    |    Suse is actually not that bad    |    138,051 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 136,153 of 138,051    |
|    Carlos E. R. to All    |
|    Re: bash script    |
|    21 Feb 17 02:58:51    |
      From: robin_listas@invalid.es              On 2017-02-21 01:53, 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.       >       > 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.              Something like this:              Have the source file string stored in SOURCE. Obtain filename, using       'basename'. Destination file will be "$DESTINATION"/"$SOURCENAME".               if test -f "$DESTINATION"/"$SOURCENAME" ; then        echo "$DESTINATION"/"$SOURCENAME exists"        echo "overwrite? Enter to continue, N[enter]"        read        if ! test "$1" = "N" ; then        copy ...        fi        fi                     --       Cheers,        Carlos E.R.              --- 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