Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Steve Bloodsworth
  Where is Steve Bloodsworth?
 Sarasota
 Florida - United States
 Steve Bloodsworth
 To: Suvi Joseph
  Where is Suvi Joseph?
 Bangalore
 India
 Suvi Joseph
 Tags
Subject: RE: ASORT()
Thread ID: 15861 Message ID: 15905 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Thursday, October 03, 2002 2:56:47 PM         
   


> > > Dear All,
> > > I came to know from VFP Help we can sort two dimensional array using ASORT command. But really didnt understand how I go about it. I can have directory structure using ADIR(xfile,"*.*"). Now I want to sort this with file extension. How do I do that? Can anyone help me?
> > > Thanks in advance
> > > Regards,
> > > Suvi Joseph
> >
> >
> > Since extension isn't one of the fields that ADIR stores, you will need to first do a run though the filename and store a JUSTEXT() to an additional element of the array. Once that is done, sorting is as easy as ASORT(xdir,nColumntoSortBy).
> >
>
> I am sorry. I didnt get what you are saying. is JUSTTEXT() a command?. From my understanding ADIR stores file extension too. If I say ?xfile(1,2). It shows some number. I thought that is extension stored in number and If I sort that column, I will get the the sorting by extension. wont I? And please tell me what is JUSTTEXT()? It shows an error message when I run this in command prompt.
> Regards,
> Suvi Joseph


It is JUSTEXT only one T in the middle.

It gives you just the extension of a filename.

~S

ENTIRE THREAD

ASORT() Posted by Suvi Joseph @ 10/2/2002 3:01:30 PM
RE: ASORT() Posted by Steve Bloodsworth @ 10/2/2002 3:43:18 PM
RE: ASORT() Posted by Suvi Joseph @ 10/3/2002 8:45:39 AM
RE: ASORT() Posted by Steve Bloodsworth @ 10/3/2002 2:56:47 PM
RE: ASORT() Posted by Suvi Joseph @ 10/6/2002 7:16:33 AM
RE: ASORT() Posted by Simon Arnold @ 10/6/2002 10:07:45 AM
Thanks Simon and Steve Posted by Suvi Joseph @ 10/6/2002 10:29:37 AM
The code Posted by Suvi Joseph @ 10/6/2002 11:05:56 AM
And.... Posted by Suvi Joseph @ 10/6/2002 2:15:05 PM