Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
I need to run an external program to process some files. I have added the location of the program to my .bash_profile (I use a mac) and I have verified that executing the program in Terminal works.
However, whenever I execute
Run["program"] Mathematica returns 32512. I suppose this is some error code but I can't find what it means.
Whatever idea you have will help me.
asked Aug 28, 2016 at 5:55
62733 silver badges1313 bronze badges
Your problem is likely to be that the program you are trying to run is not on the path that Mathematica is using. To see this you can use:
file = CreateTemporary;
Run[StringJoin["echo $PATH >", file]];
I get the following
answered Aug 28, 2016 at 11:22
16k22 gold badges1919 silver badges5151 bronze badges
Run["DIR"]no problem. $\endgroup$
RunProcesswill return an
Associationwith more status info about the program you tried to execute. $\endgroup$