I have found in those situations that it is best to start right from the command line or with a batch file. That makes it a lot easier to keep trying it, and to see the console error messages, until you have it right. Then you can just copy-and-paste into your 4GL program's OS-COMMAND statement.
I've also found it is best to use complete paths when possible, rather than relative paths. I again recently came across something that should work just find based on the OpenEdge session's starting directory and the relative path of what was being accessed, yet something in Windows prevented it from working. Changing from a relative path to a fully qualified path fixed the problem.