Search code examples
shellpowerpointpowershell-3.0

How to open a pptx file using shell script


I am trying to open a pptx file using shell script. I have tried following commands catppt and catdoc. It's not working.

Is there any other command?


Solution

  • If the file extension .pptx is associated with the correct program (PowerPoint, I assume), you can just use Invoke-Item cmdlet in Powershell.

    For example :

    Invoke-Item -Path C:\Path\To\MyFile.pptx
    

    Invoke-Item automatically uses the appropriate program to open the file, depending on how the file association is configured in the "Default Programs" control panel.