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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Limiting the characters of Folder name
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

praveen248

India
10 Posts

Posted - 04/12/2016 :  04:28:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

jasonzhao

China
262 Posts

Posted - 04/12/2016 :  04:58:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - jasonzhao on 04/12/2016 05:01:22 AM
Go to Top of Page

aplotnikov

Germany
160 Posts

Posted - 04/12/2016 :  04:59:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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$
Go to Top of Page

praveen248

India
10 Posts

Posted - 04/12/2016 :  06:30:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

aplotnikov

Germany
160 Posts

Posted - 04/12/2016 :  06:59:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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)"
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000