This project has moved and is read-only. For the latest updates, please go here.

Converting all files in a folder

Apr 28, 2015 at 4:31 PM
Is there a way to use OfficeToPDF to convert all the files in a particular folder? I currently have to select each one individually.
Apr 28, 2015 at 5:00 PM
Edited Apr 28, 2015 at 5:02 PM

OfficeToPDF.exe doesn't have an in-built batch mode, but you can do this from the command line:

e.g. if your files are in "C:\docs\toconvert\" and OfficeToPDF.exe is in "C:\programs\OfficeToPDF.exe", you can run this from the command line:
for /r "C:\docs\toconvert" %v in (*.*) do "C:\programs\OfficeToPDF.exe" "%v"
If you want to run the same thing from a batch file, you need to double up on the '%' signs:
for /r "C:\docs\toconvert" %%v in (*.*) do "C:\programs\OfficeToPDF.exe" "%%v"
You can add the OfficeToPDF.exe switches (like /print) in the command if need be.

Using the method above, PDFs for each file in the directory will be created in the same directory, just with a .pdf filename extension.

Marked as answer by cognidox on 5/5/2015 at 2:49 AM
Apr 28, 2015 at 6:31 PM
That worked like a charm! That's just what I was looking for. Thanks for the quick reply!