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
 Import file name as variables without extention

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
ivydong Posted - 02/25/2013 : 9:57:17 PM
Origin Ver. and Service Release (Select Help-->About Origin): v8.1.34.90
Operating System: Win7

I'm using the batch processing and trying to use the file names without extension as column values in the result sheet. When I work on the template, I added variables and their values in the import wizard by specifying the delimiters. The extensions are gone when I try to insert variables in the template workbook(it was saved as a link). When it comes to batch processing, I was expecting to see only the variable part of the file name in the report result, so that I can use the number to do calculation(without the file extension). However, it always showed as the full file name (with the extension). Is there any way I can either do something with the template, or get rid of the extension in the report workbook? I mean all I need is changing column values from "20.txt" to "20" will be fine. Thank you for your help.
2   L A T E S T    R E P L I E S    (Newest First)
ivydong Posted - 03/05/2013 : 01:03:46 AM
Thank you so much, Easwar. It works like a charm!!!
easwar Posted - 02/27/2013 : 5:45:55 PM
Hi ivydong,

Perhaps you can send your analysis template to support and we can take a look? You can use the "Send File to Tech support" link on the top of this page, and then refer to this post in your message.

Another solution is the following:
1> Do not worry about extracting file name in your filter etc - just import the data and set up the analysis template for your operations

In the Batch Processing tools, after you pick all the files you want to process:
2> Set the Dataset Identifier drop-down to File Name, this will add a 1st column in the Output sheet which will have the file name with the extension.
3> In the same dialog, expand the Script branch, and in the "Script at the End" edit box, enter this script:

range r1=1;
for(int ir=1; ir<=r1.GetSize(); ir++)
{
   str$ = r1[ir]$;
   r1[ir]$ = str.GetFileName(1)$;
}
r1.format=1;


Then at the end of the batch processing task, the script will run automatically and convert the 1st column by stripping off the extension and also converting the column to type numeric.

Easwar
OriginLab

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