Mailinglist Archive: opensuse (1982 mails)

< Previous Next >
Re: [opensuse] forcing order of file copy
  • From: Jos van Kan <vankan@xxxxxxxxxxxx>
  • Date: Thu, 13 Nov 2008 20:39:49 +0100
  • Message-id: <491C8285.7020503@xxxxxxxxxxxx>
Istvan Gabor schreef:
Hello:

I have an MP3 player that plays the files according to order
their were saved on the flash drive (practically according to
their index numbers).
When I copy the files onto the flash drive the order of the copy
not always occurs alphabetically. Eg. copying of 04.mp3 may
precede copying of 03.mp3. I tried command line cp, rsync,
krusader in kde.
When I copy several albums to a card the order of songs
frequently messed up.

How could I force copy to take place in alphabetical order in
linux?

In the directory of the mp3 files (bash shell):

for file in *mp3; do cp $file <destination_dir>; done

You can check for yourself that this gets them in alphabetical order by:

for file in *mp3; do echo $file; done

Regards,
--
Jos van Kan registered Linux user #152704
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References