Click to See Complete Forum and Search --> : Sorting by name
jdavia
05-17-2003, 11:48 AM
I have files that are sorted by disk number. There are 36 disks with 20 files on a disk. The names are unsorted.
Disk01-01 James
Disk01-02 Doris
Disk01-03 Harry .. up to twenty. Then
Disk02-01 John
Disk02-02 Mary
Disk02-03 Elvira .. up to twenty. and so on.
I need them sorted by name instead, with the name first, and the disk number (unsorted)last.
Doris Disk01-02
Elvira Disk02-03
Harry Disk01-03
James Disk01-01
John Disk02-01
Mary Disk02-02
Short of doing them all from scratch, is there a way to sort the names in the computer as I show above.
Nevermore
05-17-2003, 11:50 AM
Sorry, I don't understand the question.
jdavia
05-17-2003, 03:15 PM
Originally posted by cijori
Sorry, I don't understand the question.
Thanks for the reply. I edited the post to make it clearer, I hope.
Nevermore
05-18-2003, 03:37 AM
What language are you looking to use?
jdavia
05-18-2003, 02:14 PM
The list is actually to be used for song listings. I just used names to be simpler without explaining too much. However now I will explain in full.
The songa are all in the computer filed from CD+G 36 disks. So that would be DISK 01-01 Meaning the first disk and the first item on the disk.
I order for me to select the song for the person I look for that disk file.
There is a problem with that method because some don't people want to look to find the disk number to give me, instead they ask if I have a certain song, which I can't find with the present filing system. So I need them filed by name.
It isn't going to be used online as HTML or any other code. But if it takes a code to do it, I don't care as long as it will sort. Once it is sorted by name, I can always copy/paste the results as my new name list.
cojori, (Jacob) I read your pages. I will be on the road in a few days, maybe about Tuesday. So you may not hear from me. I will be in contact when I arrive to my destination.
Incidently Did we leave you out in our main page or rwpaste? It seems so since you have a page up there. I don't lnow who decides it but i need to know so a it can be included in the menu and messages for links.
Nevermore
05-18-2003, 02:30 PM
If you put all of the names into an array in JavaScript, the function your_array_name.sort() will alphabetise them.
jdavia
05-18-2003, 02:58 PM
Originally posted by cijori
If you put all of the names into an array in JavaScript, the function your_array_name.sort() will alphabetise them.
I am trying to avoid retyping the almost one thousand name list from scratch.
How can the array sort this file?
Disk 12-20 Always on my mind.cdg
to this
Always on my mind.cdg Disk 12-20
Assuming there were others in the sort.
Would I have to first move the first portion to the end first in each file, then put it in an array to sort.
I was thinking of using "Find/Replace" in several steps (about 12) to do that. If I can use the (*) in place of the song name, because every one is diferent. Do you follow me on that? and can that be done?
At any rate, can you give me a sample of the array? with only a few names. Thanks.
Charles
05-18-2003, 05:34 PM
As English appears to be your second language, I'm having trouble understanding just what it is that you are trying to accomplish. And you never answered the question about what languages you have available. JavaScript hasn't any file controls so you wouldn't want to use that. I would use Perl myself, but many would prefer Java.
So please tell us what languages you have available and more fully explain your quest. Do you just want an index or are you trying to rearrange the files themselves? If it's just an index, what format do you want it in? If you want to rearrange the files, do you have enough space on your hard drive to hold all of them at once?
jdavia
05-18-2003, 11:42 PM
Originally posted by Charles
I would use Perl myself, but many would prefer Java.
I don't know Perl So I suppose that is out. Since Javascript won't do it that's out too. All I have left is Java and HTML.
fully explain your quest.
I thought I did explain it better. Here is one more try. The files are now sorted by Disk and key numbers.
I want to take the disk and key numbers from the front of each file and insert them in the end of the file.
This leaves the song name at the beginning. Since there are 700 of them they need to be sorted alphabetically to the name.
Do you just want an index or are you trying to rearrange the files themselves?
I really want an index because the files take up too much space.
[i]do you have enough space on your hard drive to hold all of them at once?]/i]
I have enough hard drive space to duplicate the files until they are resorted by name, then I can delete the other disk sort when I'm through. I have two 60gig hard drives to work with. They can be compressed if need be.
I hope you can understand it now.
jdavia
05-19-2003, 12:46 AM
I want to thank everyone for responding to my post.
I kept searching for a way, while waiting for help, and finally found it.
The program is Excell. It has find/replace, and alse "Sort" It does exactly what I need. I copy/paste the files, use find/replace, then Sort.
I end up with an index file sorted by name.