Converting FROM any file MS Word Can Open To Any File MS Word Can Save As

If you have trouble running these examples please see Using the Command Line and Helpful Hints For Creating a Command Line.

The 'MS Word' conversion method allows for you to convert any file MS Word can open to any type Word can 'Save As'. Of course, you must have MS Word installed on your PC. Also, different versions of MS Word have the ability to open varying types of files. For example Word 2000 can open Wordperfect files, however Word 2003 cannot. If you are not sure if the file can be opened by Word, simply run Word and attempt to open the file in question. If it can open the file it will. If it can but requires additional filters, Word will prompt you to install them. If you think it should open but it doesn't, get your MS Office CD-ROM out and try the installation. See if you can add the necessary "Converters and Filters\Text Converters" for your specific needs.

Example: Converting from a WordPerfect file to a Word Document

You should have MS Word 2000 for this to work. To convert a single text file, D:\ MyTextFiles\Rand.WPD to a MS Word file D:\MyDocFiles\Rand.DOC use the following syntax:

 

ConvertDoc /S"D:\MyWPDFiles\Rand.WPD" /T "D:\MyDOCFiles\Rand.DOC" /C0 /M1 /V

 

The /S and /T switches above specify Source (input) and Target (output) path respectively and are both required when converting a single file. Use double quotes around the path especially if there are space characters within the path.

The /M1 switch tells Convert Doc to use the 'MS Word' method (it is one of the three possible conversion methods).

/C0 is the output file type, which in this case is a text file. Looking up the output file types within the File Type Constants Specification for the 'PDF Conversion' method will show that the numeric value of 1 corresponds to a text file.

To see the whole list of file type constants (and possibly many others) do the following:

1. Run Convert Doc user interface.

2. Select "Convert Files" option

3. Select "Use MS Word" as the conversion method

4. Select the "[?] OTHER FILE TYPES" from the "Convert to File Format" within the user interface.

5. View the "Convert To File Format" drop down list box to get the Conversion Constants.

The /V (for Verbose) switch is used to give instant feedback by having the program report the status of the conversion with a message box. You can remove this once you have perfected your command line specification. You can also (or instead of /V) create a Log file that will contain the results of the conversion by using the /L switch.

Note: It is highly encouraged that you use the Verbose (/V) switch initially to see what the status of your conversion is and to help you perfect your command line. When in verbose mode the program will tell you what went wrong or right with your command line using message boxes.

Converting a Whole Folder

To convert all the WPD files in the D:\ToDo\ folder to Text files in the same directory, the following syntax would be used.

 

ConvertDoc /S"D:\ToDo\*.WPD" /T "D:\ToDo\*.DOC" /C0 /M1 /V

 

The /G switch can be used to tell 'Convert Doc' to simply place each output file in the same folder as each input file. Therefore the command line above is equivalent to the command line below:

 

ConvertDoc /S "D:\ToDo\*.WPD" /G /C0 /M1 /V

 

Converting a Whole Folder and all Sub-Folders

To extend the previous example (immediately above) to convert all sub folders within D:\ToDo\ simply add the /R switch.

 

ConvertDoc /S"D:\ToDo\*.WPD" /G /C0 /M1 /V /R

 

Toconvert a whole folder and its sub folders and place the output into a separate folder/drive. In which case use this syntax:

ConvertDoc /S"D:\ToDo\*.WPD " /T "C:\Done\*.DOC" /C0 /M1 /V /R