How to get name of the standalone application with .exe extension while it is executing?
Ältere Kommentare anzeigen
I have a standalone application, which is invoked with-
matlabXX.exe 'abc.txt'
Now when it is executing, I can get 'abc.txt' using vararg but how can I get 'matlabXX.exe'?
1 Kommentar
Steven Lord
am 14 Mär. 2023
How were you hoping to use this information if you were able to get it?
Antworten (2)
Walter Roberson
am 14 Mär. 2023
0 Stimmen
Using .exe implies MS Windows.
You can use System.Diagonstics.Process and related facilities methods to find your current process identifier and use that to find the name of your process.
Image Analyst
am 14 Mär. 2023
0 Stimmen
See attached utility that I use to get the filename of the executing standalone executable.
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!