Performing a Silent Conversion with Multiple Files

Before you attempt to perform a silent conversion with more than one file, you need to get set up. 

You will need to create 3 folders ( you can name them however you choose - the following are just examples). The best place for these folders is directly in your C: drive:

  • InputFolder: Place all the PDF files that you wish to convert in this folder. Note that you can only convert using a single layout at a time, so if your files are different, you will want to keep them in separate folders.
  • LayoutsFolder: Place the layout file that is specific to the structure of the PDF files in your InputFolder. If you haven't created a layout file yet, open your user interface and create one. Then, export it into this folder.
  • OutputFolder: This is the file where your converted files will be saved to. Leave it empty.

When performing a silent conversion on multiple files, use the " %%g" so that it's not necessary to type in the path to each file indivudually.

Here is a sample of a basic silent conversion with multiple files from a .bat file.

for /F "delims=." %%g in ('dir /b "C:\InputFolder"\*.pdf') do "C:\Program Files (x86)\CogniView\PDF2XL CLI\PDF2XL.exe" -input="C:\InputFolder\%%g.pdf" -layout="C:\LayoutsFolder\TheLayout.layoutx" -format=excelfile -range=all -output="C:\OutputFolder\%%g.xls" -noui -autoopen=off

When using the sample script above, be sure to change the paths ( example: C:\InputFolder) to properly identify where your files are stored, as well as the layout name (TheLayout.layoutx).

Note the difference in the loops ( %%g) when converting the same script through the command prompt:

for /F "delims=." %g in ('dir /b "C:\InputFolder"\*.pdf') do "C:\Program Files (x86)\CogniView\PDF2XL CLI\PDF2XL.exe" -input="C:\InputFolder\%g.pdf" -layout="C:\LayoutsFolder\TheLayout.layoutx" -format=excelfile -range=all -output="C:\OutputFolder\%g.xls" -noui -autoopen=off

Still need help? Contact Us Contact Us