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
 Reading the file name?

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
autopilot Posted - 03/18/2009 : 08:43:53 AM
Origin Ver. and Service Release (Select Help-->About Origin): 7.5 SR6
Operating System: WinXPPro

Hello,

In order to import the data from files, I need to know the file names in advance. But what if I do not know the files name?
Is there any command to read the file names?
3   L A T E S T    R E P L I E S    (Newest First)
rlewis Posted - 03/23/2009 : 6:27:06 PM
May be a bit tricky with LabTalk ...
However, if willing to try OriginC there are functions like
FindFile, FindFiles, FindFirstFile, FindNextFile, GetFileNames, GetFilenamesInFolder, etc which will do what you want.
autopilot Posted - 03/23/2009 : 4:56:53 PM
Thank you very much for the reply,

however, this script uses the open dialog window, but I need to automatically load all available files without dialog...

Cheers
rlewis Posted - 03/20/2009 : 03:20:26 AM
The following is an example of a LT script that can be used to browse for a file ... before acting upon it

run.section(file.ogs,Init);
FDLOG.numTypes=1;
FDLOG.type1$=[User Data *.*]*.*;
FDLOG.Dlgname$=Select one or more User Data Files;
if (FDLOG.multiopen()==0/0) return 1;
MyCounts=FDLOG.multiopen.count;
for (k=1;k<=MyCounts;k+=1)
{
	Fdlog.get(A,k); // %A now contains the path to the first data file
	// do something with %A 	
};


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