mIRC Home    About    Download    Register    News    Help

Print Thread
#100497 13/10/04 01:05 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I need to sort the results of a $findfile command to be alphabetical. Is there any way to do this? How is $findfile sorting items anyhow? It's not based on creation date, access date, filename, or size...

Any help would be appreciated. Basically, I have a script that creates files of different users, each with info from that user in it. When people want to view this information, it would be nice to sort it based on the filename (the nick is the filename). Thanks.


Invision Support
#Invision on irc.irchighway.net
#100498 13/10/04 01:26 AM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Best way to do it would be to, use a @window, with -s flag. i.e.

/window -s @window
//var %i = $findfile($mircdir,*,*,0,aline @window $1-)

Then drag the data out with; $line(@window,N) where N is the line number.

Eamonn.

#100499 13/10/04 01:28 AM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
To do so, put the command line:
/window -hns @FileSort
To create a hidden minimized @FileSort Window. Then use:
$findfile(dir,wildcard,N,depth,@FileSort)
Which will display it in the hidden @FileSort window in alphabetical order. You can then use /filter to display it wherever you want. A little foggy on the /filter part, but it all works out.


- Relinsquish
#100500 13/10/04 03:10 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Thanks. Works great.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard