mIRC Homepage
Posted By: Jonkka put lines in a text file in a specific order - 17/05/05 08:41 PM
I have no idea if this is possible at all, but I'll ask here anyway smile
I have a textfile containing a nick and a number like this:

nick1 13
nick2 4
nick3 17

and so i would like something that would organize the file so that the one with highest number would be on first line in the text file and so on. But is it possible to do such a thing with mirc script and a text file or should I use some other method for this?
Suppose you had those nicks with their according score in a file called score.txt, located in your main mIRC folder. All it takes to sort those based on their score, in descending order is the issuing of the /filter command like this:

/filter -ffctue 2 32 score.txt score.txt
How to do this alphabetically? I look at the switches in help but it explains not very well.
leave off the ue in the /filter command...the u makes it a numeric sort, the e makes it in descending order.
For an alphabetic sort (A - Z) just leave off those two switches, although you'll have to change what you're sorting by, as the original was looking at the numbers
and how about an ini file? if i want to sort this file it doesnt quite do what it must be frown
the ini file looks like this :
[Words]
Berry975=50
Berry974=14000
Berr976=1
Berry977=1587

How can i sort this in a new file bij most words first?
© mIRC Discussion Forums