How to convert batch of doc files to docx, this should also work for ppt and xls files

Today I had to need to convert a bunch of old Office 2003 .doc files to a new Office 2010 .docx, file format, since it was a few hundred files that I had to convert I started looking for a easiest way to do it, after a few minutes of Google search through solutions with using macros I find one that doesn’t need any macros or programming on this blog.

You can do it using Microsoft Office Compatibility Pack and Microsoft Office Migration Planning Manager.

Here are the steps needed for a bulk conversion from .doc to .docx:

  1. Download Microsoft Office Migration Planning Manager (MigrationPlanningManager.exe, 2.7 MB)
  2. Download Microsoft Office Compatibility Pack (FileFormatConverters.exe, 37.0 MB)
  3. Extract Office Planning Manager (OMPM) to some directory (I used d:\doc2docx for example here)
  4. Go to Tools directory where you extracted OMPM (in my case d:\doc2docx\Tools)
  5. edit the ofc.ini file for following lines:
    fldr='path to directory with .doc files you want to convert'
    DestinationPathTemplate='path to where you want to save converted files'

    Your ofc.ini file should look something like this:

    TimeOut = 300
    ; FullUpgradeOnOpen: if set to 1, Word documents will be fully converted to the OpenXML format
    ;                    if set to 0 (default), Word documents will be saved in the OpenXML format in compatibility mode
    ; Not applicable to Excel or PowerPoint files.
  6. open command prompt and run ofc.exe from Tools directory (in my case D:\doc2docx\Tools\ofc.exe), you should get a message like this one:
    Microsoft Office File Converter version 12.0.4518.1032
    Copyright (c) 2006 Microsoft Corporation. All rights reserved.
    Automatically converts Office documents to 2007 Microsoft Office system file for
    mat based on settings in the OFC.INI control file.
    Converting files from folder d:\doc2docx\Files2convert
    Converting: d:\doc2docx\Files2convert\4thFile.doc Writing converted file to: d:\
    Converting: d:\doc2docx\Files2convert\File1.doc Writing converted file to: d:\do
    Converting: d:\doc2docx\Files2convert\FileNo3.doc Writing converted file to: d:\
    Converting: d:\doc2docx\Files2convert\SecondFile.doc Writing converted file to:
    Converting: d:\doc2docx\Files2convert\ThisIsFile5.doc Writing converted file to:
    Start: 2012-07-23 16:05:12
    End: 2012-07-23 16:05:17
    Total time used to convert files (sec): 4
    Total number of files processed: 5
    Total number of files converted: 5
    Conversion Complete.

The converted files will be in the directory of your DestinationPathTemplate


3 thoughts on “How to convert batch of doc files to docx, this should also work for ppt and xls files

  1. I have been testing the OMPM tool (ofc.exe) to convert Office 2003 files in bulk to the Office 2007 format (XML). The problem I encounter is that we convert the files and OFC places them in a specific directory that follows the same structure of the source path. But we end up with the original files plus other non Office files in the source path, and now a target path that contains all the converted files.

    How can we remove the files that were successfully converted? Assuming I have a media copy or a backup of the original files, I feel I can discard the converted files.

    Another option would be to move the converted files out of the source path into a separate folder, and place the XML version in their place. This way, we are not detaching the Office files from other documents that belong together.

  2. We made a full copy of the source data to the ‘converted’ data folder and ran the tool. As mentioned above we now have duplicate copies – one ending in .doc and one with .docx and one with .xls and .xlsx. To resolve this from a command prompt we run the following commands on the converted folder to delete the old format files:
    forfiles /s /m *.doc /c “cmd /c del @file”
    forfiles /s /m *.xls /c “cmd /c del @file”
    This allowed us to do a batch conversion to the openxml format and then do a batch delete of the old files but leave the converted files along with other file formats and the folder structure.

Leave a Reply