Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 17 Nov 2018, 07:07
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to copy a folder so its files load in correct order?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13086
Location: Arizona USA

PostPosted: Tue 13 Feb 2007, 10:05    Post subject:  How to copy a folder so its files load in correct order?
Subject description: Solved!
 

I just bought an iriver T10 mp3 player. I use it to listen to audio books-on-CD that I turn into mp3 files so I can put the whole book on the mp3 player. The iriver T10's operating system plays tracks in the order they were loaded.

A typical book folder has 200 mp3 files. When I mount the mp3 player in ROX, then drag a book's folder to it, the mp3 files inside the folder do not load in numerical order (starting with the lowest-numbered file and progressing to the highest) as they do in Windows. Instead, Puppy (or ROX) usually loads them starting with the highest-numbered file. The last time I tried it, they were loaded in mixed-up bunches.

Is there any way to get Puppy to load those files in the right order? I'm having to load the iriver T10 in Windows to get the books to play right. Embarassed

Last edited by Flash on Wed 13 Aug 2014, 11:01; edited 2 times in total
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Tue 13 Feb 2007, 10:44    Post subject:  

i think:

you have a Flash mp3 player

you mount the player and copy mp3s to it

you want to copy the mp3 files in a certain order, usually in alphabetical order

as far as i know, Rox should do this automatically ... i just conducted a simple experiment, copying selected files from a folder to /tmp ... Rox copies the files in the order in which they are arranged in the Rox window ... i can see the files as they are copied one by one in the copy-transfer-status window ... i can see the files appearing one by one in the /tmp window ... so i can see the order in which they are being copied

so as far as i know, Rox is doing exactly what you would expect it to do

you can right click the Rox window to arrange the files by Name, Type, Date, Size, Owner, Group ... and you can reverse the order in which they are arranged

it might be easier to click the Show Extra Details button at the top ... then you can arrange the order by clicking the label at the top ... click Name to arrange by name, click Name again to arrange by Name, reverse order

are you using a version of Puppy with Rox 1.2 or Rox 2.5? ... Rox 2.5 arranges files by name better than Rox 1.2 does

you can copy the paths to the file names to the clipboard by holding the ctrl key down and selecting the files with the mouse ... or select all the files from the menu or by pressing ctrl+A ... the files will be in the same order that they are arranged in in the Rox window ... this is useful to make a script, or to paste to something

if you are using Rox 2.5, there shouldn't be a problem ... if you drag the files from one folder to another, the files should be copied in the exact order in which they are displayed
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6266
Location: Knoxville, TN, USA

PostPosted: Tue 13 Feb 2007, 15:22    Post subject:  

You could write a script to do it file by file, just to be sure. Also, it might be a syncronizing thing. Puppy will say it copied all the files, but it won't actually do it until it feels like it (or you tell it to with the 'sync' command). Maybe when it actually writes the files it does it in another order?

This should copy individually, syncing after each one. On my system it goes alphabetically already:
Code:

for i in *.mp3;do
echo "Now copying $i"
cp "$i" <mp3-player>
sync
done
echo
echo "Finished."

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13086
Location: Arizona USA

PostPosted: Wed 14 Feb 2007, 18:12    Post subject:  

Thanks, guys. Smile I'll experiment after I've listened to the books on the mp3 player. (If I mount the thing, it forgets its place in the book I was listening to.)

GuestToo, I want the files copied in numerical order (they are named 001, 002, ... 125 ... etc. I haven't seen a book with more than about 800 tracks altogether.)

The first time I tried to transfer some books, I mounted the mp3 player, then for some reason created a folder with the name of the book and dragged the mp3 files into it from where I had them in /tmp. I happened to notice that they started transferring with the last file instead of the first, and that's the way the mp3 player played them! So I tried a few things. Dragging the book folder from /tmp to the flash mp3 player in ROX, I noticed that the files loaded starting with 001, and that's the way they were played.

The other flash mp3 player I have is a Creative MuVo TX. It plays the files in numerical order no matter how they were loaded. Go figure. Confused
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6266
Location: Knoxville, TN, USA

PostPosted: Wed 14 Feb 2007, 18:32    Post subject:  

My iAUDIO ColorSound lets me chose based on download-time, file-time, or alphabetical. It also has a playlist feature, but I don't bother with it (easier to just group by folder, as it has a pretty decent browsing menu).

Plus, it plays Oggs. Very Happy

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13647
Location: Karlsruhe, Germany

PostPosted: Wed 14 Feb 2007, 18:52    Post subject:  

This might work, but did not try:
Code:

cd /musicfolder

ls | sort -n | while read a
do

echo "$a"
# add here a comand to copy files or so


done


Try
sort --help
for more options.

Mark
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13086
Location: Arizona USA

PostPosted: Wed 14 Feb 2007, 22:17    Post subject:  

Thanks, Mark. The rxvt cursor just sat there when I tried that but I'm guessing it's because my author and book names contain spaces. However you gave me an idea to try in ROX, that seemed to work.

First, I opened one of the book folders in ROX that had seemed to transfer the files out of order, and tried copying them to a flash memory. As far as I could tell they did the same thing as before, although it happens so fast it's hard to read the numbers. Then, in the book folder open with all the files, I clicked the "sort" icon at the top of the ROX window (The down-pointing arrow) and cycled all the way through the options to "sort by name, ascending," so the file names started at 001. Then I selected all the files and copied them to the folder in the flash memory again. This time they seemed to go in order.

It will be awhile before I can try it on my mp3 player, but I'll bet it works.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13086
Location: Arizona USA

PostPosted: Wed 13 Aug 2014, 10:55    Post subject:  

Okay, time for an update. Laughing

The method I highlighted in my last post does solve the problem of loading books into my mp3 player so the files play in the correct order, but it is a bit cumbersome and slow if I'm loading several books into my mp3 player. Someone, I forget who, pointed out that Puppy comes with a command-line program called rsync which might do what I want. I found that rsync does indeed copy the mp3 book files to my mp3 player in numerical order. However, being a command-line program, it is even slower to set up each transfer than was ROX. Then don570 wrote a GUI that uses rsync and called it Copy Fast. Copy Fast does what I want with no fuss and no muss. Very Happy
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0542s ][ Queries: 12 (0.0103s) ][ GZIP on ]