Delphi/Lazarus: Get File Name of own Application
Question by Compi | Last update on 2024-01-12 | Created on 2016-06-06
Is there a way to find out, determine or retrieve the name of the EXE file of your own program? For example "MyApp.exe" or whatever the name is?
Of course, theoretically, I know how I have named my own EXE, but, however, the user could have named the program file to any other arbitrary name. And this is the case I would like to check for.
Related Topics
MIME Types of Microsoft Office File Formats
Info | 0 Comments
Rename File to its Folder Name
Tutorial | 0 Comments
PHP: File Download Script
Tutorial | 0 Comments
Lazarus: Load File as Byte Array and save Byte Array as File
Tutorial | 0 Comments
Delphi: Global Treatment of Errors (Exceptions)
Tutorial | 0 Comments
How to resize Image before Upload in Browser
Tutorial | 13 Comments
Delphi/Lazarus: Difference between ParamStr(0) and Application.ExeName
Question | 1 Answer
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
You can read out the EXE file of your own application by using Paramstr(0) as a well as with Application.ExeName.
However, both also provide you additionally with the complete application path, so that you have to divide path and program name from each other:
With ExtractFileName(), you can cut off the path from your program file so that you will only get the name of your EXE.
Last update on 2024-01-12 | Created on 2016-06-07