#11
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
[OT] file order under *nix (was For edlin users)
|
#14
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
file order under *nix (was For edlin users)
|
Thread Tools | |
Display Modes | |
|
|
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 |