tantiger
Singapore
41 Posts |
Posted - 10/04/2002 : 06:02:32 AM
|
I have a big problem here. I used a script to import many ascii files at one time, it works fine. However, when I check the OPJ file size, I reallized that all the closed windows are still saved as the file is quite large. I can use "list s" to see all of them and after I delete them, the OPJ file size decreased dramatically.
Is there any way of delete those temporary worksheets during importing?
the scripts as follows: %L="F:\Data\DSC"; win -t wks Origin; %W=%H; %W!wks.joinmode=0; // Set %W worksheet to append mode delete %(%W,2); delete %(%W,1);
FDLOG.DlgName$="Import DSC/DTA Files (TA Format)"; // Title Bar text FDLog.CheckName$="DTA Files (Please Uncheck for DSC files!)"; //FDLog.Message$="DTA"; // Comment text FDLog.CheckStatus=0; FDLog.ShowComment=0; FDLog.path$= %L; FDLog.numtypes=3; FDLog.type1$=[TXT files]*.TXT; FDLog.type2$=[DAT files]*.DAT; FDLog.type3$=[All files]*.*; FDLog.defType=1; FDLog.multiOpen.sort=1; // Sort only Groups selected!
If(FDLog.MultiOpen()!=0/0) { Loop(mmm,1,FDLog.MultiOpen.Count) { newcol=%W!wks.ncols; FDLog.Get(A, mmm); win -t wks origin wks$(mmm); open -w %A; %T=%H; #!type "File #$(mmm) - %A"; %W!wks.join(%T); delete %(%W,$(newcol+1)); win -c %T; fnpos=0; pathlength=%[%A]; For(ijk=pathlength; ijk>0; ijk--) { If ("%[%A,ijk:ijk]"=="\") { fnpos=ijk; //position of "\" ijk=-10; //end condition }; }; %B=%[%A,fnpos+1:pathlength-4]; %A=%[%Z,@7];%A=%[%A,"m"];%A=%[%A,>"e"]; #!Type "Name = %B Size = %A"; //win -a %W; %W!wks.col$(newcol+1).type=4; %W!wks.col$(newcol+1).label$="Temp,K"; %(%W,newcol+1)+=273.15; //col($(newcol+1))+=273.15; %W!wks.col$(newcol+2).label$="%B"; //col($(newcol+2))/=%A; %(%W,newcol+2)/=%A; } } %W!wks.labels(); #!type "All file imported sucessfully."; del -v mmm; work -s 0 0 0 0; if(!FDLog.checkstatus) { work -p 200 DSC; return; } else work -p 200 DTA; Return; |
|