How To Merge Flat Meditech Data Files - 101
To quickly combine multiple files, place the files you want to combine in a new folder.

Open a command prompt: click your Start button
, click Run
, type cmd. Use the CD (Change Directory) command to navigate to the folder where your files are stored.
Use the DIR command to create a file with a list of the text files in this folder: dir *.txt >Dir.txt. Close your command prompt, by clicking on the X as shown:
.

Using a text editor, copy the file names from Dir.txt into a new text file.
Save the new file as CombineFiles.bat in your directory with the other files.

Using copy /b combine all file names in a + delimited list onto the first line of the CombineFiles.bat file. After your list of files, type a space and then the name for your new large file which will contain the contents of the other files.
Example 1: copy /b Data-File-0.txt+Data-File-1.txt+Data-File-2.txt+Data-File-3.txt+Data-File-4.txt+Data-File-5.txt+Data-File-6.txt+Data-File-7.txt+Data-File-8.txt+Data-File-9.txt+Data-File-10.txt+Data-File-11.txt New-Large-File.txt This will combine the files in the exact order you've expressed in your + delimited list.
Example 2: If file order doesn't matter, copy /b *.txt New-Large-File.txt will copy all files into the new file.

Save and close CombineFiles.bat. Run CombineFiles.bat by going back to your folder with the files and clicking on CombineFiles.bat. Running this file is known as executing a batch file.
When the batch file completes (this can take a while if your files are large), your command prompt will close by itself. Go back to your folder to find your new file containing the contents of the other files, if you’ve followed the naming convention above, the file will be named: New-Large-File.txt.

There: we’ve successfully combined 10 flat data files into 1 large data file, just like that.
Want an alert when the next post is published? Click the phone and Subscribe to the MEDITECH Reports Blog!