Page 1 of 1

Command Line Error

Posted: Wed Jan 14, 2026 4:23 am
by ezninnovation
I am trying to run a python script via the execute command element to unlock a pdf.

I set my command to location of my python.exe: C:/Users/switch/AppData/Local/Programs/Python/Python313/python.exe
I set my arguments to the directory where my program is "...UnsecurePDF.py" --input "%1" --output "%2"

The job fails with Job failed because outcode is nonzero, outcode = [1] and when I check the Log files the error is the following:

'/c' is not recognized as an internal or external command, operable program or batch file.

This runs correctly when I run it from the CMD prompt but I cannot get it to run within Switch.

Thanks in advance.

Re: Command Line Error

Posted: Wed Jan 14, 2026 1:52 pm
by tdeschampsBluewest
Hi,

For standard command execution, I would recommend trying the Run command app. It is generally much simpler and more robust than the default Execute Command element.

That said, the issue you are encountering is very likely related to a space in the path to your Python executable or script. In that case, enclosing the full path in quotes should resolve the problem.
However, based on the command you shared, this already appears to be correctly handled, which makes the behavior somewhat unexpected.