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
 Origin Forum
 Labtalk - Create new folder

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
Francesco84 Posted - 10/10/2018 : 12:37:25 PM
Hello to all,
I would like to ask a question.

I'm programming with Labtalk and I need to create a new folder in a specific path in my PC.
It is possible?

For example, is it possible to create a new folder on Desktop?

Thanks for the answers,
Francesco
2   L A T E S T    R E P L I E S    (Newest First)
Francesco84 Posted - 10/12/2018 : 03:36:57 AM
Thank you Cpyang,

taking example from your code, I did as follows, in order to create a folder in any position

cd NewPath$; // change the current working directory
mkdir "Test" // create the "Test" subfolder
.
// Other operations
.
cd %Y // restore the default working directory





Francesco
cpyang Posted - 10/10/2018 : 8:57:00 PM
I dont know which version of Origin you have but in a more recent version, you can find out the Desktop path by using the string register to the Apps root folder, then go back word to find the user's root, then you can use the cd command to switch to the desktop folder, then use mkdir command to create your folder.


I have tested this code with Origin 2018b, but I believe it should work in 2017 as well.


//the following LabTalk code will make a folder called "Test" on the desktop
string str$=%@A; //Apps folder
int nPos=str.Find("AppData");
str$=str.Left(nPos-1)$;
str$=str$+"Desktop";
str$=;//this should dump the desktop path
cd str$;
mkdir "Test";



CP


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