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
 Ėmport script-stripping file 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
neutrondude Posted - 08/25/2009 : 07:24:19 AM
Origin Ver. and Service Release (Select Help-->About Origin): 7.5
Operating System: XP

Dear all, I want to have a script that strips the filename of the data set (under import) and only usees the last four characeters(numbers)
I have tried something like this but it doesnt work. Could you help me?

%A = page.info.system.import.filename$; // get filename
%A = %[%A,#1,.]; // strip extension
%A = %[%A,>%[%A]-4]; // strip all but last 4 characters
win -r %H %A; // rename worksheet
3   L A T E S T    R E P L I E S    (Newest First)
Laurie Posted - 08/26/2009 : 10:59:25 AM
Great. Thanks for catching my mistake.

%A = page.info.system.import.filename$; // get filename
%A = %[%A,#1,.]; // strip extension
length = %[%A]; //length of string
%A = %[%A,length-3:length]; // strip all but last 4 characters
win -r %H %A; // rename worksheet
delete -v length; //delete variable

OriginLab Technical Support
neutrondude Posted - 08/25/2009 : 10:04:48 AM
Thanks a lot it works (after replacing "size" with "length" in the script..)!!
Laurie Posted - 08/25/2009 : 09:48:56 AM
Try the following:

%A = page.info.system.import.filename$; // get filename
%A = %[%A,#1,.]; // strip extension
length = %[%A]; //length of string
%A = %[%A,size-3:size]; // strip all but last 4 characters
win -r %H %A; // rename worksheet
delete -v length; //delete variable

OriginLab Technical Support

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