It will get the name of the executable, even the new name after renaming it.
So, unlike the mainframe compilers that put the compiled name in the binary (was used to check to make sure the right name was used to invoke it, part of security checking back then), this command must do a DIR type of command to fetch where and what the executable is.
Note: The security checking was to make sure that a renamed binary was not inserted into a production system. Yes, there were ways around it, and when CICS came about, more robust module integrity checks were put into place (some by me back then). Something similar can be done in QB64,
Thanks.
@George McGinn Command$(0) will be the full path that is resolved to the running executable. Give it a try.