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.
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) }
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?