Joey Joey - 3 months ago 26 Question

How do I get the filename of my launched file without extension / directory?

How do I find the current name of my launched project without listing the directory or extension?

I've searched for other solutions, but all of them either has the extension at the end, and/or the directory location at the start, I just want the plain file name, no extension, no directory.


Dim Filename as string = (code that finds the file name)

Which would output
as for this example the program was named


If this is a WinForms app:

Dim fileName = IO.Path.GetFileNameWithoutExtension(Application.ExecutablePath)