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
 Check and create directory

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
tib Posted - 10/08/2003 : 1:45:05 PM
Hi there,

when I want to export a file (OGG, PDF, ...) with LabTalk
I can check with the following command whether it already exists.

TMP=file.exist(Path\Filename); // 0=not found, 1=exist;

How can I check for a directory?
And in case it doesn't exist how do I create it?
My search for "create" and "directory" in the Origin LabTalk Help was unsuccessful so far.
Do I have to use DOS commands?
Something like run -e md NewDir???

Thanks for hints, Tilman.


4   L A T E S T    R E P L I E S    (Newest First)
tib Posted - 10/15/2003 : 02:19:34 AM
OK, thanks Mike. I had the old help files. Strangely enough, you still cannot find CheckMakePath by searching for "CheckMake". You'll find it by searching for "Check". But anyway, it's there where you said with SR4 help. Thanks, Tilman.


Mike Buess Posted - 10/14/2003 : 3:40:52 PM
CheckMakePath is listed under Origin C Language Reference->Global Functions->File Management in 7.0 SR4. If you've already updated to SR4 you should Check for Updates again to get the new help files. Patches and updated Help files are supplied separately these days.

Mike Buess
Origin WebRing Member
tib Posted - 10/14/2003 : 3:15:07 PM
Hi Mike,
I have Origin7 and I am about slowly switching to OriginC...
However, I could not find the syntax of your magic "CheckMakePath" function in the OriginC manual. Or is this your custom defined function?
Thanks for your help & patience, Tilman.

Mike Buess Posted - 10/08/2003 : 5:32:48 PM
Hi Tilman,

If you have Origin 7 then all of that can be done with Origin C's CheckMakePath function. It tests for the existence of a path and creates all necessary folders if it doesn't. In Origin 6.1 or earlier the only way to find out if a directory exists is to look for a file within it. You need to know a file's name in order to look for it in Origin, so that can get messy. A DOS solution will work for creating a directory, but I don't remember if you can test for a directory's existence from DOS. Check out http://www.nmrtools.com/labtalk/dos.htm for some information about running DOS commands from Origin.

Hope that helps.

Mike Buess
Origin WebRing Member

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