Read the current exe file name after compiling

3 visualizaciones (últimos 30 días)
Mubin R
Mubin R el 4 de Nov. de 2021
Respondida: Mubin R el 5 de Nov. de 2021
Hello everyone,
I converted an m file to exe, and it(exe) creates a copy of its own with different name. According to their name, they should do different tasks. Now when I try to run the exe file with 'mfilename' it reads the original m file name, not the exe file name. Can anyone show me the right direction?
Thanks
  3 comentarios
Mubin R
Mubin R el 4 de Nov. de 2021
No, it's showing matlab version name
Daniele Sonaglioni
Daniele Sonaglioni el 4 de Nov. de 2021
I think that the problem is in which way you create your exe file: probably creating a standalone app will solve your problem.

Iniciar sesión para comentar.

Respuesta aceptada

Mubin R
Mubin R el 5 de Nov. de 2021
Found a solution
a= Environment.GetCommandLineArgs;
b=string(a)
it gives the current exe file name

Más respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by