prefilepath=Set Default Directory( "C:\Users\Administrator\Desktop\新建文件夹\" );
filepath= Convert File Path( prefilepath, Windows );
filelists = Files In Directory(filepath);
lotfile="DFB-B2";
nf=N Items( filelists );
cctable= New Table( lotfile);//make an empty table
cctable<<New Column( "Source", Character, Nominal );
For( iii = 1, iii<= nf, iii++,
filenow=(filelists[iii]);
// If( Ends With( files, ".csv" ),
dt= Open( filelists[iii] );
dt<<new column("Source", Character, Nominal ) ;
:Source<<set each value(filenow);
dt<<new column("lotNO", Character, Nominal ) ;
:lotNO<<Set each value(Insert( substr(filenow,1,2),:ChipID));
dt<<run formulas();
cctable << Concatenate( Data Table( dt ), Append to first table );
// Text Box( Regex( files, "(.+?)_", "\1" ) ) << journal; // All text before first "_" in file i's name is journaled
close(dt,nosave);
);
cctable<<save("C:\Users\Administrator\Desktop\新建文件夹 (2)\","Concatenated data.jmp");
who can tell me why the last line is invalid??