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
 Limiting the characters of Folder 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
praveen248 Posted - 04/12/2016 : 04:28:24 AM
I've a doubt regarding the limiting the characters of a folder name


I've a folders named as
Folder_00000123_ABC_000
Folder_00000124_ABC_000


what is the command/script to type in command window to rename the above folder name using either labtalk or origin:
Folder_123
Folder_124


B.V.Praveen
4   L A T E S T    R E P L I E S    (Newest First)
aplotnikov Posted - 04/12/2016 : 06:59:45 AM
Use exist() function to check whether a folder exists in a project (requires ver. 8.1SR2 or higher):

if (exist(fname$,25)==25) fname$=fname$+"(01)"
praveen248 Posted - 04/12/2016 : 06:30:08 AM
Thanks for the quick response quys.Very helpful

I've got one more doubt, If there are two or three folders with same name, origin doesn't create a duplicate folder, how to enable it?

For example:
If i create subfolders in the same folder
Input:
MainFolder
-Folder_123
-Folder_123
Output Requirement:
MainFolder
-Folder_123
-Folder_123(1)

how to do this like automatically duplicating a folder name when there is actually a same folder name

B.V.Praveen
aplotnikov Posted - 04/12/2016 : 04:59:29 AM
You can use %[]-notation as follows:

newname$=%[%(oldname$),1:7]%[%(oldname$),13:15]

If you need to rename a project folder you can do it using Project Explorer X-function:

pe_rename oldname$ newname$
jasonzhao Posted - 04/12/2016 : 04:58:07 AM
Hello,

You can rename the folder in Origin Project in this way:

pe_cd /;    //Go to the level which contains the two specific folder
pe_rename Name newName;  //rename the folder name with the newName

please refer to this page for further information.
http://www.originlab.com/doc/LabTalk/guide/Managing-the-Project

Best regards!
Jason
OriginLab Technical Service

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