Convert Multiple PowerPoint Files to PDF using CMD

Basil Ogbunude

Any way to convert multiple PowerPoint files in a folder to PDF using Windows command line?

npocmaka

It's not fail safe (you can add file existence checks and so on). Save this as a .bat:

@if (@X)==(@Y) @end /* JScript comment
    @echo off

    cscript //E:JScript //nologo "%~f0" %*

    exit /b %errorlevel%

@if (@X)==(@Y) @end JScript comment */

var source=WScript.Arguments.Item(0);
var target=WScript.Arguments.Item(1);
PP = new ActiveXObject("PowerPoint.Application");
PRSNT = PP.presentations.Open(source,0,0,0)
//PRSNT.SaveCopyAs(target,32);
//https://msdn.microsoft.com/en-us/vba/powerpoint-vba/articles/ppsaveasfiletype-enumeration-powerpoint
PRSNT.SaveAs(target,32);
PRSNT.Close();
PP.Quit();

The first argument is the powerpoint file the second is the new file where you want to save it. More info about the presentation object

Next step is to process files(if the previous script is saves as ppt2pdf.bat):

@echo off
::change the locataion in the line bellow
set "ppt_dir=c:\ppts"
for %%a in ("%ppt_dir%\*pptx" "%ppt_dir%\*ppt") do (
  call ppt2pdf.bat "%%~fa" "%%~dpna.pdf"
)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Merge / convert multiple PDF files into one PDF

From Dev

Convert PowerPoint 1995 files to modern PowerPoint version

From Dev

How to convert html files to pdf using Cocoa

From Dev

Convert scanned pdf to .txt files using tesseract

From Dev

How to convert html files to pdf using Cocoa

From Java

Splitting multiple PDF files using parallel and mutool

From Dev

Render multiple pages to pdf files using PhantomJS

From Dev

Render multiple pages to pdf files using PhantomJS

From Dev

generate and save multiple pdf files using mPDF

From Dev

How to convert pdf files in multiple folders into multiple pdf files matching the folder names

From Dev

make: Convert .pdf files in a folder to .txt files without using loops

From Dev

Convert PDF with embedded fonts to EMF for PowerPoint

From Dev

How can I automatically convert PowerPoint to PDF?

From Dev

How to convert Powerpoint ppsx (presentation) to pdf?

From Dev

Rename multiple files as "Modified Date/Time" using cmd or Powershell

From Dev

Move multiple files from subfolders to one folder using CMD or Batch

From Dev

How to merge the first N words of multiple tmp files using cmd

From Dev

Using OpenXML to save a PowerPoint presentation as a PDF

From Dev

cmd command for renaming multiple files

From Dev

Edit multiple cmd files in a directory

From Dev

Is there a tool to convert the pdf files to chm?

From Dev

How to convert PDF files to images

From Dev

Is there a tool to convert the pdf files to chm?

From Dev

Batch convert docx files to pdf

From Dev

How to convert Html files to Pdf?

From Dev

How to convert PDF files to images

From Dev

Programmatically convert multiple midi files to wave using timidity, ffmpeg, and bash

From Dev

How to convert multiple tiff file to png files using gmmagick?

From Dev

CMD compile using jar files

Related Related

  1. 1

    Merge / convert multiple PDF files into one PDF

  2. 2

    Convert PowerPoint 1995 files to modern PowerPoint version

  3. 3

    How to convert html files to pdf using Cocoa

  4. 4

    Convert scanned pdf to .txt files using tesseract

  5. 5

    How to convert html files to pdf using Cocoa

  6. 6

    Splitting multiple PDF files using parallel and mutool

  7. 7

    Render multiple pages to pdf files using PhantomJS

  8. 8

    Render multiple pages to pdf files using PhantomJS

  9. 9

    generate and save multiple pdf files using mPDF

  10. 10

    How to convert pdf files in multiple folders into multiple pdf files matching the folder names

  11. 11

    make: Convert .pdf files in a folder to .txt files without using loops

  12. 12

    Convert PDF with embedded fonts to EMF for PowerPoint

  13. 13

    How can I automatically convert PowerPoint to PDF?

  14. 14

    How to convert Powerpoint ppsx (presentation) to pdf?

  15. 15

    Rename multiple files as "Modified Date/Time" using cmd or Powershell

  16. 16

    Move multiple files from subfolders to one folder using CMD or Batch

  17. 17

    How to merge the first N words of multiple tmp files using cmd

  18. 18

    Using OpenXML to save a PowerPoint presentation as a PDF

  19. 19

    cmd command for renaming multiple files

  20. 20

    Edit multiple cmd files in a directory

  21. 21

    Is there a tool to convert the pdf files to chm?

  22. 22

    How to convert PDF files to images

  23. 23

    Is there a tool to convert the pdf files to chm?

  24. 24

    Batch convert docx files to pdf

  25. 25

    How to convert Html files to Pdf?

  26. 26

    How to convert PDF files to images

  27. 27

    Programmatically convert multiple midi files to wave using timidity, ffmpeg, and bash

  28. 28

    How to convert multiple tiff file to png files using gmmagick?

  29. 29

    CMD compile using jar files

HotTag

Archive