George Potemkin
Member
I need to start a Progress session using a OS-COMMAND.
There is a space in DLC path , so I need to put the path to the executable file in quotation marks.
Also I need to use the quotes for the parameters passed to a Progress executable (e.g. for –pf).
But if the command uses more than one pair of quotes, I get an error as if they were not used at all:
'C:\Progress\OpenEdge' is not recognized as an internal or external command, operable program or batch file.
Test without Progress:
Instead of
param "abc"x
I’m getting:
param "abcx
One quote is always lost - no matter how many quotes I would add.
It returns the expected result:
param "abc"x
Note: there are no quotation marks around cmd - it's the only difference.
Is this a known issue? Is there a solution?
There is a space in DLC path , so I need to put the path to the executable file in quotation marks.
Also I need to use the quotes for the parameters passed to a Progress executable (e.g. for –pf).
But if the command uses more than one pair of quotes, I get an error as if they were not used at all:
Code:
DEFINE VARIABLE vCommand AS CHARACTER NO-UNDO.
ASSIGN vCommand = SEARCH("_progres.exe").
OS-COMMAND VALUE(QUOTER(vCommand) + ' -param ""').
Test without Progress:
Code:
DEFINE VARIABLE vCommand AS CHARACTER NO-UNDO.
ASSIGN vCommand = '"cmd" /c echo param "abc"x'.
OS-COMMAND VALUE(vCommand).
Instead of
param "abc"x
I’m getting:
param "abcx
One quote is always lost - no matter how many quotes I would add.
Code:
DEFINE VARIABLE vCommand AS CHARACTER NO-UNDO.
ASSIGN vCommand = 'cmd /c echo param "abc"x'.
OS-COMMAND VALUE(vCommand).
It returns the expected result:
param "abc"x
Note: there are no quotation marks around cmd - it's the only difference.
Is this a known issue? Is there a solution?
Last edited: