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
 multiple open script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

gelokkir2

Greece
5 Posts

Posted - 02/17/2003 :  06:29:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I would like to write a script that opens multiple ascii files, each in a separate worksheet, and then saves them as separate origin files.
There is an example on the originlab website, but it doesn't seem to be complete, and so it doesn't work.
I would appreciate any help you can offer.

Thank you.

Mike Buess

USA
3037 Posts

Posted - 02/17/2003 :  08:41:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I don't know which script you're referring to or why it doesn't work, but this should do what you want...

getfile -m; // get multiple ASCII data files
for(i=1;i<=count;i+=1)
{
getfile -g i; // get file name into %A
win -t data; // bring up a new worksheet
open -w %A; // import the data
save -i C:\Data\%H; // save wks as C:\Data\wksname.ogw (adjust path as needed)
}

Mike Buess
Origin WebRing Member
Go to Top of Page

gelokkir2

Greece
5 Posts

Posted - 02/17/2003 :  09:10:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Thank you very much for your help.
This seems to work. However, although it opens all the files correctly it gives an error message (something like: file cannot be saved because it's being used) when it tries to save them.
Any ideas?

thank you.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 02/17/2003 :  1:47:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Are you sure that the directory named in the save command exists? I got this error message when I tried to save to a folder that doesn't exist...

"Can not open file C:\Data\SampleData.ogw for saving. File is in use or read only."

Mike Buess
Origin WebRing Member
Go to Top of Page

gelokkir2

Greece
5 Posts

Posted - 02/18/2003 :  6:54:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes,this was the problem. It's now working alright.

Thank you very much for your help!
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