unbundlex12.exe command line arguments

Jul 19, 2011 at 9:29 PM
Edited Jul 19, 2011 at 9:30 PM

Can you shed some light on the usage of the 4th command line argument for unbundlex12.exe? It's the optional output filename string format... {0}\{1}_{2:000}{3}.  I've not been able to figure out how to successfully pass it a filename.  I see that it uses C# string format which is kinda regex*ish*, but I've not been able to decode how the braced groups ({0},{1},{2}) play into it.


Jul 20, 2011 at 3:57 AM

It is indeed an optional argument.  If you don't supply it well use the default value in the following statement:

                string outputFilename = String.Format(formatString, outputDirectory, inputFile.Name, i + 1, inputFile.Extension);

The intent is to write the unbundled files into the output directory with the same file name as the original but with sequence numbers after the filename.  Example command line:

UnbundleX12 c:\MyEdiFile.txt 2300 c:\Output {0}\{1}_{2:000}{3}

This will take the original file and supposing it has 3 claims inside it will create:




The format string uses {0} to indicate that this should be replaced with the 0 index argument that comes after the format string in the call to String.Format.


The only reason that I make this optional is because I think in general people will want to zero pad their sequence number so alphabetical sorting will sort the sequence and I think other people may choose to pad their sequence number with more than 3 zeros.  So I added as a quick and dirty way to override the default format string.

IF you want to specify the naming convention of the output files you can modify the format string like the following: "{0}\{1}_Output_{2:000}{3}" will produce





Jul 20, 2011 at 3:16 PM

OK, that helps me.  One thing to note; the 2nd token, {1}, inputfile.name, includes the extension.

So UnbundleX12 c:\MyEdiFile.txt 2300 c:\Output {0}\{1}_{2:000}{3}

Would result in:




At least that's how it works when I run it.