0

I am trying to run a batch file from matlab. In my batch file I have the command to run the .exe file. I am using the dos('myfile.bat') command to run the batch file from matlab, but it is showing the error as

"file.exe is not recognized as an internal or external command, operable program or batch file." 

What exactly is this error? And how should deal with this.

1 Answer 1

1

If I understand correctly you try to run an exe in MatLab. You don't have to put it inside a batch file, you only need to call it in this way:

! file.exe

or you can setup a string and call it with eval:

command = [ '! ' filename ];
eval( command );

But I think the problem is that you should specify the path of exe (or bat if you like) with absolute path.

! D:\Development\Stuff\App.exe

And of course pass the arguments if required.

! D:\Development\Stuff\App.exe -arg1 -arg2
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.