How to run exe file in Ubuntu [duplicate]

Is it possible to run a .exe file in Ubuntu in a script? For example a simple Matlab code like this:

system("dir/WAV2RAW.exe")

Solution 1:

I think you should use Wine.

sudo apt-get install wine
wine dir/WAV2RAW.exe

Or Mono if you know that exe is .NET application:

sudo apt install mono-runtime
mono dir/WAV2RAW.exe

Solution 2:

As mentioned in the comments this may be an XY problem

You could use 'sox' to convert from raw to wav file types:

sudo apt install sox

will install the program, then

sox --type raw <infile> --type wav <outfile>

would perform a simple conversion from the raw to wav formats