A Cycling & bikes forum. CycleBanter.com

Go Back   Home » CycleBanter.com forum » rec.bicycles » Techniques
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

For edlin users



 
 
Thread Tools Display Modes
  #11  
Old February 27th 10, 02:55 AM posted to rec.bicycles.tech
Nate Nagel[_2_]
external usenet poster
 
Posts: 1,872
Default For edlin users

On 02/26/2010 07:14 PM, SMS wrote:

When copying folders to a USB stick I found that Windows did not copy in
alphabetical order, even when I was careful to not have leading 0's or
blanks. I.e. D01T02.mp3 would not necessarily be copied over before
D01T10.mp3.


That's astonishingly annoying.

If I were less lazy, I'd try to run a test to see if Linux handled that
correctly, but despite the fact that I'm obviously sitting in front of
my computer, and I have a USB stick in my pocket, I... well... yeah.

nate

--
replace "roosters" with "cox" to reply.
http://members.cox.net/njnagel
Ads
  #12  
Old February 27th 10, 05:39 AM posted to rec.bicycles.tech
[email protected]
external usenet poster
 
Posts: 3,092
Default For edlin users

On Feb 26, 7:55*pm, Nate Nagel wrote:
On 02/26/2010 07:14 PM, SMS wrote:

When copying folders to a USB stick I found that Windows did not copy in
alphabetical order, even when I was careful to not have leading 0's or
blanks. I.e. D01T02.mp3 would not necessarily be copied over before
D01T10.mp3.


That's astonishingly annoying.

If I were less lazy, I'd try to run a test to see if Linux handled that
correctly, but despite the fact that I'm obviously sitting in front of
my computer, and I have a USB stick in my pocket, I... well... *yeah.


If you're really worried about it:

for i in `ls *.mp3` ; do cp $i /media/disk ; sleep 0.01 ; done

Ben

  #13  
Old February 27th 10, 06:45 AM posted to rec.bicycles.tech
Tad McClellan
external usenet poster
 
Posts: 85
Default [OT] file order under *nix (was For edlin users)

wrote:
On Feb 26, 7:55Â*pm, Nate Nagel wrote:
On 02/26/2010 07:14 PM, SMS wrote:

When copying folders to a USB stick I found that Windows did not copy in
alphabetical order, even when I was careful to not have leading 0's or
blanks. I.e. D01T02.mp3 would not necessarily be copied over before
D01T10.mp3.


That's astonishingly annoying.

If I were less lazy, I'd try to run a test to see if Linux handled that
correctly, but despite the fact that I'm obviously sitting in front of
my computer, and I have a USB stick in my pocket, I... well... Â*yeah.


If you're really worried about it:

for i in `ls *.mp3` ; do cp $i /media/disk ; sleep 0.01 ; done



That won't answer the question, because the file glob (*.mp3)
does sorting.

( what order you get on Microsoft "operating systems" is not universally
defined, as each individual program does the globbing, rather than
the (approximately universal) shell doing the globbing.
)

Even without globbing, ls sorts by default.

"ls -U" to avoid sorting.

cp will copy in the order the args are given. But the args are most
often given by globbing, and globbing sorts.

So "cp *.mp3 somedir/" will copy in alpha (ASCIIbetical?) order.


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
  #14  
Old February 27th 10, 09:23 AM posted to rec.bicycles.tech
Ben C
external usenet poster
 
Posts: 3,084
Default For edlin users

On 2010-02-26, * Still Just Me * wrote:
On Fri, 26 Feb 2010 07:15:38 -0800, SMS
wrote:

Hey, I still use those DOS commands on occasion. Well not edlin, but
I've had to create some complex batch files recently to do mass renaming
and copying of files and directories for music and audio books that I
was putting on a USB stick for the car. The receiver reads the USB stick
in the order of which files were put on there. Copying directories in
Windows was screwing up the order of audio books.


I believe technically you are doing "windows scripting", not "DOS
commands". (Not to be too anal... but that's what this group is all
about :-).

That said, scripting is still the best way to do large scale batch
operations. A windowing interface doesn't always meet the task.


It often doesn't. It's meant to make you think computers are friendly
and easy to use. But the truth is: either you learn to program the
computer or it's going to program you.
  #15  
Old February 27th 10, 09:34 AM posted to rec.bicycles.tech
Ben C
external usenet poster
 
Posts: 3,084
Default For edlin users

On 2010-02-27, Nate Nagel wrote:
On 02/26/2010 07:14 PM, SMS wrote:

When copying folders to a USB stick I found that Windows did not copy in
alphabetical order, even when I was careful to not have leading 0's or
blanks. I.e. D01T02.mp3 would not necessarily be copied over before
D01T10.mp3.


That's astonishingly annoying.

If I were less lazy, I'd try to run a test to see if Linux handled that
correctly, but despite the fact that I'm obviously sitting in front of
my computer, and I have a USB stick in my pocket, I... well... yeah.


It has more to do with the filesystem on the other end. Usually the
order in which you copy the files has no bearing on the order in which
they're listed on the other end.

Although on FAT16 filesystems I think it did, so on some very cheap and
nasty MP3 players your tracks play in the order your computer decided to
copy them over.

Linux will try to copy them all at once in a way that it estimates to be
fastest to get them all over there, so the order may also depend on
where the actual blocks corresponding to the files happen to be on the
source disk.

It uses what they call an "elevator" algorithm-- if the disk head is on
its way to block 3247345 it tries to pick up any bits of any files along
the way that are also going in the same direction, analogous to the way
people who are also going up get on the same elevator as you, but those
going down wait for the next one.

This reduces the amount of "seeking" (moving the arm around, which is
slow compared to sucking data off-- hard disks are essentially
gramophone records inside).

I'd be surprised if Windows didn't do something similar. But you could
force them to be copied one at at time with a script something like:

for f in *.mp3
do
cp $f /media/usb
sync
done
  #16  
Old February 27th 10, 01:18 PM posted to rec.bicycles.tech
Barry[_3_]
external usenet poster
 
Posts: 111
Default For edlin users

When copying folders to a USB stick I found that Windows did not copy in
alphabetical order, even when I was careful to not have leading 0's or
blanks. I.e. D01T02.mp3 would not necessarily be copied over before
D01T10.mp3.


I had this problem using a USB drive in my Honda, and solved it by renaming
files with TagScanner:

http://www.xdlab.ru/en/index.htm

and reordering the files with DriveSort:

http://www.anerty.net/software/file/DriveSort.php


  #17  
Old February 27th 10, 10:08 PM posted to rec.bicycles.tech
Michael Press
external usenet poster
 
Posts: 9,202
Default For edlin users

In article ,
SMS wrote:

* Still Just Me * wrote:
On Fri, 26 Feb 2010 07:15:38 -0800, SMS
wrote:

Hey, I still use those DOS commands on occasion. Well not edlin, but
I've had to create some complex batch files recently to do mass renaming
and copying of files and directories for music and audio books that I
was putting on a USB stick for the car. The receiver reads the USB stick
in the order of which files were put on there. Copying directories in
Windows was screwing up the order of audio books.


I believe technically you are doing "windows scripting", not "DOS
commands". (Not to be too anal... but that's what this group is all
about :-).


Well I'm running them from a DOS window, though I'm creating them in a
combination of Excel, Word, and Notepad.

I guess I'm showing my age, but one really nice feature of Wordstar for
DOS was the capability to cut and paste columns of text.


The editor vim does that. Of course, vim has to be learned.
http://www.vim.org/download.php#pc

--
Michael Press
  #18  
Old February 28th 10, 01:53 AM posted to rec.bicycles.tech
Ralph Barone
external usenet poster
 
Posts: 144
Default For edlin users

In article ,
SMS wrote:

* Still Just Me * wrote:
On Fri, 26 Feb 2010 07:15:38 -0800, SMS
wrote:

Hey, I still use those DOS commands on occasion. Well not edlin, but
I've had to create some complex batch files recently to do mass renaming
and copying of files and directories for music and audio books that I
was putting on a USB stick for the car. The receiver reads the USB stick
in the order of which files were put on there. Copying directories in
Windows was screwing up the order of audio books.


I believe technically you are doing "windows scripting", not "DOS
commands". (Not to be too anal... but that's what this group is all
about :-).


Well I'm running them from a DOS window, though I'm creating them in a
combination of Excel, Word, and Notepad.

I guess I'm showing my age, but one really nice feature of Wordstar for
DOS was the capability to cut and paste columns of text. Now to do it I
have to import everything into Excel as a .csv file, move the columns
around, then export it back out, then finish editing it in Word or notepad.

That said, scripting is still the best way to do large scale batch
operations. A windowing interface doesn't always meet the task.


When copying folders to a USB stick I found that Windows did not copy in
alphabetical order, even when I was careful to not have leading 0's or
blanks. I.e. D01T02.mp3 would not necessarily be copied over before
D01T10.mp3.


I believe that MS Word on the Mac used to be able to do that by holding
down the Control key while you clicked and dragged with the mouse. You
may have had to have the document in a monospaced font... It was a
long, long time ago.
  #19  
Old March 1st 10, 01:32 AM posted to rec.bicycles.tech
[email protected]
external usenet poster
 
Posts: 3,092
Default file order under *nix (was For edlin users)

On Feb 26, 11:45*pm, Tad McClellan wrote:
wrote:
On Feb 26, 7:55*pm, Nate Nagel wrote:
On 02/26/2010 07:14 PM, SMS wrote:


When copying folders to a USB stick I found that Windows did not copy in
alphabetical order, even when I was careful to not have leading 0's or
blanks. I.e. D01T02.mp3 would not necessarily be copied over before
D01T10.mp3.


That's astonishingly annoying.


If I were less lazy, I'd try to run a test to see if Linux handled that
correctly, but despite the fact that I'm obviously sitting in front of
my computer, and I have a USB stick in my pocket, I... well... *yeah..


If you're really worried about it:


for i in `ls *.mp3` ; do cp $i */media/disk ; sleep 0.01 ; done


That won't answer the question, because the file glob (*.mp3)
does sorting.

( what order you get on Microsoft "operating systems" is not universally
* defined, as each individual program does the globbing, rather than
* the (approximately universal) shell doing the globbing.
)

Even without globbing, ls sorts by default.

"ls -U" to avoid sorting.

cp will copy in the order the args are given. But the args are most
often given by globbing, and globbing sorts.

So "cp *.mp3 somedir/" will copy in alpha (ASCIIbetical?) order.


The whole point was that SMS _wanted_ the files copied
in sorted order. The shell command I posted does that
by sorting and copying one at a time.
The "sleep 0.01" statement is in there to make sure that
nothing weird happens where one file gets created
out of turn because of buffering the writes to disk
(I don't know if this is a real issue, but the brief sleep
between copies insures that it won't happen)
or the internal behavior of the cp/copy command
going out of order, which was his complaint with DOS.

I assume this has something to do with, say, an MP3
playing program that plays the files in the order they appear
in the internal directory structure (time of creation order)
rather than in alphabetical order.

Ben
  #20  
Old March 1st 10, 08:51 AM posted to rec.bicycles.tech
Ben C
external usenet poster
 
Posts: 3,084
Default file order under *nix (was For edlin users)

On 2010-03-01, wrote:
On Feb 26, 11:45*pm, Tad McClellan wrote:
wrote:
On Feb 26, 7:55*pm, Nate Nagel wrote:
On 02/26/2010 07:14 PM, SMS wrote:


When copying folders to a USB stick I found that Windows did not copy in
alphabetical order, even when I was careful to not have leading 0's or
blanks. I.e. D01T02.mp3 would not necessarily be copied over before
D01T10.mp3.


That's astonishingly annoying.


If I were less lazy, I'd try to run a test to see if Linux handled that
correctly, but despite the fact that I'm obviously sitting in front of
my computer, and I have a USB stick in my pocket, I... well... *yeah.


If you're really worried about it:


for i in `ls *.mp3` ; do cp $i */media/disk ; sleep 0.01 ; done


That won't answer the question, because the file glob (*.mp3)
does sorting.

( what order you get on Microsoft "operating systems" is not universally
* defined, as each individual program does the globbing, rather than
* the (approximately universal) shell doing the globbing.
)

Even without globbing, ls sorts by default.

"ls -U" to avoid sorting.

cp will copy in the order the args are given. But the args are most
often given by globbing, and globbing sorts.

So "cp *.mp3 somedir/" will copy in alpha (ASCIIbetical?) order.


The whole point was that SMS _wanted_ the files copied
in sorted order. The shell command I posted does that
by sorting and copying one at a time.
The "sleep 0.01" statement is in there to make sure that
nothing weird happens where one file gets created
out of turn because of buffering the writes to disk
(I don't know if this is a real issue, but the brief sleep
between copies insures that it won't happen)


It doesn't guarantee that at all. Use "sync" instead.

or the internal behavior of the cp/copy command
going out of order, which was his complaint with DOS.

I assume this has something to do with, say, an MP3
playing program that plays the files in the order they appear
in the internal directory structure (time of creation order)
rather than in alphabetical order.

Ben

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
For Macintosh users [email protected] Techniques 0 February 18th 10 07:15 PM
For I-Pod users Bill Baka General 75 April 19th 06 02:58 AM
For I-Pod users Edward Dolan Recumbent Biking 8 April 19th 06 02:58 AM
For I-Pod users Edward Dolan Recumbent Biking 0 April 9th 06 08:19 PM
For Trainer Users Only Colorado Bicycler General 32 November 9th 05 01:23 AM


All times are GMT +1. The time now is 08:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 CycleBanter.com.
The comments are property of their posters.