mIRC Homepage

$findfile sorting?

Posted By: Riamus2

$findfile sorting? - 13/10/04 01:05 AM

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.
Posted By: Coolkill

Re: $findfile sorting? - 13/10/04 01:26 AM

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.
Posted By: Relinsquish

Re: $findfile sorting? - 13/10/04 01:28 AM

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.
Posted By: Riamus2

Re: $findfile sorting? - 13/10/04 03:10 AM

Thanks. Works great.
© 2019 mIRC Discussion Forums