 |
WordConverterExe
Command Line Interface
(Command Line or GUI Driven file
conversion)
Deutsch
|
What is the Command Line?
WordConverterEXE (WCE)
can be run from the command line allowing you to automate
processes through the use of batch files. Alternatively you can launch WCE
from 3rd party programs extending their functionality. The syntax for the command line is:
WCX.EXE /S{Source
File(s)} /T{Target File(s)} /C# [/E] [/N#] [/R] [/V] [/P#] [/K{columns}]
[/W{rows}] [/F{OutputFile}] [/L{LogFile}]
Items above
enclosed in square brackets “[ ]” are optional, all other ‘switches’ are
required. Therefore /S, /T, /C# should always be specified on the command
line.
You can include or exclude spaces
between switches and parameters. For example, "/C6" is the same as "/C
6". For long file names you may be required to use double quotes. For
example /S"C:\Program
Files\MyApp\MyDoc.DOC".
-
Important: To use the command
line successfully you must do one of the following:
-
Otherwise, you'll see the
following error:
-
"'DiffDoc' is not
recognized as an internal or external command, operable
-
program or batch file."
-
Full descriptions for each switch
are shown below:
|
Switch |
Command Line Switch Use |
|
/S[File] |
Source File(s) to be converted.
A single file including it's complete path can be
specified for a single file conversion (i.e. "D:\MyExcelFiles\MyExcelFile.XLS".
If specifying a single file, make sure that the /T switch also
specifies a single output file (i.e. "D:\MyExcelFiles\TargetOutput.CSV").
Alternatively, you can specify whole directories by using the wildcard
syntax (i.e. "D:\MyExcelFiles\*.XLS"). If specifying a whole
directory, make sure the /T also specifies a whole directory with a
new target file extension. (i.e. "D:\MyExcelFiles\*.CSV"). |
|
/T[File] |
Target File(s) to be saved after conversion. These
files are created from the Source file(s) and the conversion method
selected.
If converting a single file, make sure that the /T
switch also specifies a single output file (i.e. "D:\MyExcelFiles\TargetOutput.CSV".
If
specifying a whole directory, make sure the /T also specifies a whole
directory with a new target file extension (i.e. "D:\MyExcelFiles\*.CSV"). |
|
/C # |
Conversion type. For example to convert an excel document to a comma
delimited file the switch would be /C 6 since 6 corresponds to this
format. See File
Conversion Formats. |
|
/E |
If
converting an Excel document specify this switch. WordConverterEXE
converts MS Word documents by default. |
|
/N# |
Select
what sheets to export. The syntax is: "1,5-10,20" where commas and
dashes indicate single and whole sections of sheets. Use the "*" to
convert all sheets in the file. The exported files will have the
following name: OriginalFileName_N.TargetExtension where N is the
sheet number. |
|
/R |
Recursive subdirectories. You may add this switch if you are
processing whole directories of files. See /S and /T for more details
on selecting whole directories to be converted. |
|
/V |
Verbose
mode. Specify this switch to display a message box indicating how the
conversion went. See also /L |
|
/P# |
Special
processing to be performed on the files after conversion is done.
See the table below for all possible special processing constants.
Multiple /P# switches can be used on the command line. |
|
/F{OutputFile} |
Output file of the
resulting special processing that was specified by the /P# switch. |
|
/L[File] |
Log file
path and name (i.e. d:\mylogs\WCE.LOG) If this switch is specified a
log file with the given path and name will be created and the results
of the conversion will be written to it. See also /V |
|
/W{rows} |
Comma
delimited files (CSV) can have only those
Rows specified by this switch included in the resulting files.
The syntax is: "1,5-10,20" where commas and dashes indicate single and
whole sections of rows. Use the "*" to convert all rows in the file. |
|
/K{columns} |
Comma
delimited files (CSV) can have only those
Columns specified by this switch included in the resulting
files. The syntax is: "1,5-10,20" where commas and dashes indicate
single and whole sections of rows. Use the "*" to convert all rows in
the file. |
|
/M# |
Comma delimited files
(CSV), specify delimitation character. Change from comma
separated data to whatever character you want. For example to
switch from comma to the bar character ("|") use "/M124".
124 is the
ASCII equivalent for the bar character.
Before: A,B,C
After: A|B|C |
All Command Line Switches
|
/P# |
Special Processing Constant Use |
|
/P 0 |
No Special
Processing |
|
/P 1 |
Concatenate all files produced from the just processed
multi-file conversion. See 13 for UNICODE.
Use only with text files specified for the conversion
output.
Also see /P 12 to remove first line of each file
/F
Switch specifies the target file. |
|
/P 2 |
Special concatenation of files for use with text based
spreadsheet files. Only one header is used, the first line of the
first file opened. All subsequent files will be concatenated in full,
less the first line. This is useful if concatenating similar
spreadsheet data and only one header in the output is desired.
Use only with text files specified for the conversion
output.
/F
Switch specifies the target file. |
|
/P 3 |
Special Concatenation of CSV (Comma Delimited files).
The same as /P2 however two columns are appended to the end of each
record. The FILE and PATH of the source file for the record is shown
at the end of each record.
/F
Switch specifies the target file. |
|
/P 7 |
Pad CSV files with spaces. Takes a line which has no
spaces between the comma delimiters and adds spaces.
Before: ",,,A,B,C,,,"
After: ", , , A , B , C , , ," |
|
/P8 |
Trim CSV files. Takes trailing commas out of each line
if they are empty.
Before: ",,,A,B,C,,,"
After: ",,,A,B,C" |
|
/P9 |
CSV Files Only.
Surround all fields with double quotes ( "field1", "Field2" )
Before: A,B,C
After: "A","B","C" |
|
/P 10 |
Remove Empty Lines. Any lines that are empty are
removed from the file.
Before:
"Hello There. Thank you for buying our
product. Please do tell us if there
are any problems."
After:
"Hello There. Thank you for buying our
product. Please do tell us if there
are
any problems." |
|
/P 11 |
Remove control characters between Quotes. This is helpful because
control-characters such as line-feed and carriage-return, can mess up
other special processing methods. |
|
/P 12 |
Concatenate all files produced from the just processed
multi-file conversion, removing the first line of each file.
Use only with text files specified for the conversion output.
/F
Switch specifies the target file. |
|
/P 13 |
Concatenate all UNICODE text files produced from the
just processed conversion. See 1 for ANSI text file
concatenation.
Use
only with text files specified for the conversion output. |
Special Processing Constants of
Multi-File Conversions /P#
Download Now
Buy Now
|