Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Wrong file order (Read 8534 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Wrong file order
15.08.07 at 07:28:37
 
Wrong file order
 
I noticed something curious about the order of files on a disk when copying MP3 music. I have a set of files that is numbered from 1 - title.mp3 to 2 - other title.mp3 through to 30 - final piece.mp3. When coying these files to my MP3 player by selecting all 30 files and dragging them in windows explorer to the MP3 player I expected the order of the files to be put in numerical order.  
 
Why is this important? My MP3 player has software that plays them in alphabetical order thus there is no problem there. However my car radio that can also play MP3 music (I attach my MP3 player through USB with my car radio) lists the files in the order that I put the files onto the MP3 player.
 
I noticed that when selecting and dragging the files in windows explorer to the MP3 player that a set of 5 to 10 files at the end of the selection was put first onto the disk and then it started with number 1, 2, etc.
 
Copying the files in MSDOS using copy *.mp3 does copy the files in alphabetical (numerical) order. I don't fancy to drop down to a command line each time to copy the files however.
 
Selecting all files and using the Copy To option when right clicking in windows explorer also takes the curious sequence when dragging and dropping the files.
 
Also when I select all files (Ctrl-A) choose Copy and then select my MP3 player in windows explorer and select paste (Cltr-V) the incorrect order of the files is used. I must therefore resort to using the copy command in MSDOS...
Back to top
 
« Last Edit: 15.08.07 at 07:42:18 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Wrong file order
Reply #1 - 05.12.07 at 21:57:26
 
When the order of the files listed by the DOS command dir is wrong the method described above does not work well either. The order of the files being copied or moved is still not correct.  
 
I used the following commands today to fix this:
 
First create a file with the file names in order of the file name:
dir /B /O *.mp3 > list.txt
 
This command will list all mp3 files ordered (/O) and in bare format (/B), i.e. just the file name. It will dump all the results into a new text file called list.txt
 
Now we loop over the lines in the list.txt file creating the batch file with which to move the files:
 
for /F "delims=" %i in (list.txt) do echo move "%i" f: >> domove.bat
 
This command will loop over the lines in the file list.txt. It will put the full line of text into the variable %i. The option delims= overrides the default delimiter (space and tab) so even if the filename contains spaces the full line is taken.
The do command will be executed for each found line. Echo will therefore be run for each found line in the file list.txt
It will echo the variable %i and we put double quotes around it in case the file name contains any spaces. My MP3 player is station F so I copy the files to f:.  Just running this echo will display the command to the screen. We need to capture it into a file domove.bat. After we complete the command this file will now contain the commands necessary to move the files to f.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
kman2ya
YaBB Newbies
*


I Love SQL*XL

Posts: 0
Re: Wrong file order
Reply #2 - 30.01.08 at 12:18:54
 
Heya - this worked 4 me so had to add this noobah post cause I didn't find ne ez'er answers ...
 
create or copy the empty folder to the player
Highlight ur first file then shift left click ur last
rt click copy the files with the arrow on ur 1st file of the highlighted files
paste in ur folder on the player
 
Beats 1 by 1 or geeking out in Dos - unless u like that stuff Wink
Back to top
 
 
Email   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Wrong file order
Reply #3 - 04.08.08 at 14:10:24
 
I still find it cumbersome to have to copy and paste the 2 DOS commands to get files copied in the correct order. I found another solution today! And it works much smoother. Nothing to copy...
 
I installed the UNIX utilities for Windows from the UnxUtils project. Just using a move mv does the trick. I keep my mp3 files on a networkshare. I quick map a drive to share (say Z:) and open a MSDOS prompt. I type:
Z:
mv * f:\

 
That's it!
 
Read about the UnxUtils project here:  
http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1217847568
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1