Use the TXL file created by TXL Wizard as a batch file! The TXL file can be easily edited in any text editor.
The command line is extremely simple with TXL Wizard. In fact you need only to use the user interface to set up exactly what you would like done, go to the File menu and save a 'Conversion Job' file. A 'Conversion Job' file is saved with the *.TXL file extension. This file extension will be recognized by your operating system as a TXL Wizard file. So simply double clicking the ConversionJob.TXL file from Windows Explorer, or specifying it within the Windows Task Scheduler is really all you need to do. The TXL file is a simple text file that can be easily understood and modified within any text editor.
The TXL file has the format of an ini file, also known as an initialization file. A typical TXL file is shown below:
[TXL]
ReadMe=This is a 'TXL Wizard' Conversion Job file. Use me as a batch file to convert TXT to CSV/Excel
sInputFile=C:\Input\Example2.txt
sOutputFile=C:\Output\Example2.xlsx
sRecipeFile=C:\Recipes\Example2.rcp
lConversionMethod=1
bDoSubfolders=FALSE
bSaveInOriginalFolder=FALSE
bShowExcel=FALSE
bClearOutputFileBeforeProcessing=FALSE
lTabSize=8
lDelimitationCharacter=44
bShowStatusMessages=FALSE
Notice that any parameters that begin with a lower case b are boolean. That is they can have one of two values "TRUE" or "FALSE" (without the double quotes).
Parameter |
Meaning |
bShowStatusMessages |
Verbose mode. Specify TRUE to display a message boxes indicating how the conversion went. |
sInputFile |
Input File(s) to be converted. A single file including its complete path can be specified for a single file conversion (i.e. "D:\MyInputFiles\Single.TXT". If specifying a single file, make sure that sOutputFile also specifies a single output file (i.e. "D:\OutputFiles\TargetOutput.CSV". Alternatively, you can specify whole directories by using the wildcard syntax (i.e. "D:\MyInputFiles\*.TXT"). If specifying a whole directory, make sure sOutputFile also specifies a whole directory with a new target file extension. (i.e. "D:\OutputFiles\*.XLS"). See also /S for subfolders. |
sOutputFile |
Output File(s) to be created when converting the input file(s). Use "*.CSV" to specify comma delimited file output. Use ".XLS" or "*.XLSX" to specify an Excel file output If specifying a single input file, make sure that this parameter also specifies a single output file (i.e. "D:\OutputFiles\SingleImage.CSV". Alternatively, you can specify whole directories by using the wildcard syntax (i.e. "D:\OutputFiles\*.CSV"). If specifying a whole directory, make sure the sInputFile also specifies a whole directory with an input file extension. (i.e. "D:\MyImageFiles\*.TXT") This parameter is ignored if the bSaveInOriginalFolder parameter is set to TRUE. |
lConversionMethod |
The method of conversion is specified here. Valid values are: 0 = Profile method 1 = Recipe method 2 = Marked up file method. |
bDoSubfolders |
Valid values: "TRUE" or "FALSE". Do all files found in the Sub-folders specified in the sInputFile. Recursive subdirectories. If you are processing whole directories of files. See /S, /O and /G for more details on selecting whole directories to be converted. |
bSaveInOriginalFolder |
Valid values:
"TRUE" or "FALSE". If TRUE save files to their
original folders. Use this in conjunction with the sInputFile
to place the converted files in the same folder as the input file.
Cannot be used when converting a single, specified file from within
a folder. Use the sOutputFile
parameter instead. Output files will be saved with the same name as the original but with a different extension (CSV, XLS or XLSX). You cannot specify a different name for the output file when using bSaveInOriginalFolder. |
bClearOutputFileBeforeProcessing |
When FALSE output sheet content will not be cleared before processing. When TRUE content will be cleared from XLS or XLSX file prior to conversion. Does not apply to Profile method, as in this case output is always cleared. |
lDelimitationCharacter |
When converting to a CSV file, this argument sets the Delimitation character. That is, the character that separates the data. Use the ASCII value of the character you want to use. By default the value is 44 (which is comma). Often people use 124 (| bar) or 9 (Tab). |
ReadMe |
Use for personal notes/comments. This is displayed in the LOG when file is loaded. Limited to about 255 characters. See Readme2 if you need more space. You can use %lf% to add new lines characters. See the provided demo txl files as an example. |
ReadMe2 |
Additional notes to be displayed into the LOG. See also ReadMe. |
ReadMeCommandLine |
Displays a message box when ran from the command line. Example usage: ReadMeCommandLine="TXL Wizard is the best written tool...ever!" See also ReadMe. |
Profile Method Specific Options
Parameter |
Meaning |
sFixedWidthProfile |
If using the Profile method, specify the name of the fixed width profile being used. |
bTrimInputTextFilesPadCharacter |
TRUE=Trim excess pad characters. Set to TRUE if you wish to remove padding characters in the output file. Otherwise FALSE. The padding character is typically the space character, though could be anything. See Fixed Width Text File Defined for more information. |
bIsUnicode |
Set to TRUE if your input files are Unicode. Otherwise FALSE. |
sStartColRow |
Begin to gather data at specific row/column: Here you may specify a row column to begin gathering data. Use the same format as you would when using Excel. For example: B4 = 2nd column 4th row. |
bTreatDataAsText |
Treat values as text (i.e. leave leading zeroes intact): When the text within the input file contains data beginning with a zero and converting to Excel, Excel will truncate the leading zero. Try this option to overcome this issue and retain the leading zeros. |
lUseDoubleQuotes |
UseDoubleQuotes: 0=Never, 1=Sometimes, 2=Always |
Recipe and Mark Up Method Specific Options
Parameter |
Meaning |
sRecipeFile |
Recipe file to use. See also lConversionMethod. |
lTabSize |
Sets the size of the tab. Indicates the size and may be a number between 2 and 16. Initial default is set to 8, the most common tab stop size. |
bUnix |
If using the Recipe or Mark up method specify if the input files are from the Unix platform. TRUE or FALSE are valid values. |