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
 directory for multiple ASCII import

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
polphys Posted - 01/21/2005 : 09:19:49 AM
Origin Version (Select Help-->About Origin): v7.0552
Operating System:win2000

Hi,

I want to define the path for a multiple ASCII import (getfilename -m) in my LabTalk script, but I didn't find a n appropriate command. Or is there any solution to import all files with a given extension of a known directory without using getfilename -m?
4   L A T E S T    R E P L I E S    (Newest First)
polphys Posted - 01/25/2005 : 01:56:26 AM
Thank you,
it's really so easy. I didn't see the wood for the trees and afterwards, I cannot understand, why I didn't find it by myself (overly fixed to the getfile -m command).
The fdlog.multiopen command has the wanted flexibility. So I can offer the choice between the import of all files completely automatically by running appropriate DOS commands in a batch file with the run -e command (as shown in the first answer) or an individual selection of files, starting in a given directory.

Thank you again.
Mike Buess Posted - 01/23/2005 : 9:25:56 PM
Both solutions import files with a specific extension. The LabTalk solution requires you to select one file in a folder and then imports all files in that folder with the same extension. The Origin C solution imports all files in a named folder that have the extension "txt". LabTalk has no method for listing files so the first solution uses a batch program to obtain that list. The second solution may be best suited for your situation. Just specify your starting directory in strPath and substitute your extension for "txt".

...Are you really just looking for a way to open the multiple file dialog in a specific folder? If so, use fdlog.path$ to name the folder and fdlog.multiopen() to open the dialog. Then use fdlog.get(A,n) to assign the nth selection to the string variable %A.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/24/2005 07:18:24 AM
polphys Posted - 01/23/2005 : 4:49:41 PM
Thank you Mike for your help,
with these ideas I could import all files. But for a selection of files, I prefer getfilename -m. But fdlog.path$ seems to define only the path for the dirctory of an open command. And I want to start in a special directory, because it is already known at this time.

Thanks again for solving the import of all files.
Mike Buess Posted - 01/21/2005 : 10:02:40 AM
You can learn about a LabTalk method for importing all files in a given directory here...

http://www.nmrtools.com/labtalk/i_flist.html

An Origin C method for doing the same thing is discussed in this topic...

http://www.originlab.com/forum/topic.asp?topic_id=2952&archive=

Mike Buess
Origin WebRing Member

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