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
 get information from the name file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

joss31

France
33 Posts

Posted - 06/12/2014 :  06:14:02 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 6.1 labtalk,

Hi everybody,

I import multiples ASCII files and I plot them in worksheets and in graphs.
The problem is when you import multiple file the %A is not the name of the file he is becoming the same of %B, but I need the name of my file not all the path.
So for getting information that I need I read character in the path but it does not work when I change the path.


getfile -m *.*; // Prompt for multiple files
for (ii = 1; ii <= count; ii ++)
{
getfile -g ii; // Get the iith file into %A
open -w %A; // This IMPORTS that file
hfile=file.open(%A); // This OPENS the file for processing
%P = HEAP%[%A, 54:57]%[%A, 78:80];// Take the value of the heap and the number of the block store it in %P variable
%K = HEAP%[%A, 54:57];
%V =%[%A, 78:80];
worksheet -c ALLSTRTIME; // Create new Ycolumn named ALLSTRTIME
worksheet -c Ech%V;


So Is there a solution for get just the name file with a multiple file importation?
OR
Changing the path with a file which existing like the "Origin6.1" file?

So thank you in advance for your reply.

Joss.

greg

USA
1378 Posts

Posted - 06/16/2014 :  2:20:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Newer versions of Origin have functions for getting things like path, filename, filename without extension, etc.
Your old version doesn't, so you'll have to kludge one together using substitution notation.
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