The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Sort file list from GetFile

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
tom3m Posted - 02/21/2002 : 1:03:18 PM
I have a script that is working quite well for plotting certain data sets and am now working on tuning a few finer details. One thing that has bugged me a bit is that if I use:

GetFile -m *.*;

to open a file chooser, then select a range of files in the usual windows way (pick one, shift click on second to choose range) and add those files to the list, the file names do not necessarily get put into the list in alphabetical order. For example, if I choose "file_A.txt", "file_B.txt", and "file_C.txt" the files might be put in order A-C-B instead of A-B-C. My guess is this has something to do with the Windows API and not Origin. Is there a way to sort the internal structure that Origin uses to store the file names so that when I read the files from this list one-by-one and operate on them, I can operate in alphabetical order?

I can import, operate on, and plot data from the files; it would just be nice to process the files in order since the plots that are generated are ordered in the same way as the data is read.

I just realized that another way to do this would be to sort pairs of column (X,Y columns) names before plotting. I'll have to look into that. It seems that sorting the file list would be easier and faster.

Thanks!
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 02/21/2002 : 1:26:21 PM
If you are using Origin 6.1 you should try fdlog.MultiOpen() instead of getfile -m. You can choose which columns (filename, size, modification date, etc.) to show in the selection list and sort the files according to any of the columns. Files are imported in sorted order. Check out the fdlog object in Labtalk help for details.

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000