1536_en-US
Concatenating large number of filesHi Guys,
I am trying to concatenate several files in a folder as below:
Re: Concatenating large number of filesSee:
Jump into JMP Scripting
By: Wendy Murphrey and Rosemary Lucas
// http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=61733
Page 122, Soultion 5.16
Set Current Directory( "C:\temp2" );
myFiles = Files In Directory( "C:\temp2" );
For( i = 1, i <= N Items( myFiles ), i++,
/* If the file is the first in the list, open it. Otherwise, open the table, concatenate with the main table, and close the table just opened. */
If( i == 1,
mainDt = Open( "C:\temp2\" || myFiles ),
dt = Open( "C:\temp2\" || myFiles );
mainDt = mainDt << Concatenate( dt, Append to First Table );
Close( dt, NoSave );
Wait( 0 );
)
);
/* Give the final table a name. */
mainDt << Set Name( "Concatenated Files" );
Best regards,
-Matt
Comments
There are no comments yet