EDI File Joiner

Combine Separate EDI Files Into One

EDIFileJoiner

 

Main Features

Details

EDIFileJoiner quickly and efficiently combines separate EDI files into one.  By allowing custom read and write buffer size EDIFileJoiner decreases IO and increases overall performance.  File joining is performed asynchronously on pooled threads to increase program responsiveness.

The Code

EDIFileJoiner joiner = new EDIFileJoiner();

// Join the files at the ST header level
joiner.FileJoinLevel = FileJoinLevel.HEADER;

// Subscribe to be notified when the joining operation is complete
joiner.OnFileOperationCompleted += new EventHandler(joiner_OnFileOperationCompleted);

// Specify the list of files to join
List files = new List();
files.Add("834_1.txt");
files.Add("834_2.txt");
files.Add("834_2ST.txt");
files.Add("834_5010.txt");

// Join the EDI files
joiner.Join(files, "CombinedAll.txt");
   
private void joiner_OnFileOperationCompleted(object sender, FileOperationCompletedEventArgs e) {
   if (e.Status != FileOperationStatus.Success) {
     // Success
   }
}