I'm trying to run a program located at ~/src/prog/myprog written in Cpp.
But when I want to start it with
ipcBeginProcess("~/src/prog/myprog") it won't work.
sh: ~/src/prog/myprog: not found
What is the problem here?
A complete path will work, but I need the short one, like above.
And another question: What is the best way to run commands? Via ipcBeginProcess, sh or internal functions like (CreateDir. DeleteDir, ...)ipcBeginProcess("mkdir -p test")
sh("mkdir -p test")
You can use "simplifyFilename()" to expand a file name to a fully qualified path, for example:
For your question about which is best, it really depends on what you need to do; if bi-directional communication is required between DFII and the external program, then use the ipc* functions, but if you just need to fire off an external command and don't need any further interaction with it, use one of the csh(), sh(), shell() or system() commands.
Hope this answers your questions!
In reply to skillUser:
great! Thanks for the reply. That helped a lot!