How can I find the actual filename of the app that was opened?


#1

The getApplicationName() method requires me to explicitly specify an application name. But I’d like to be able to use the name as it exists on the drive. So if I create an app called A and make a copy called B, I’d like to know whether I opened A or B. I looked at the GetCommandLineParameters method but it seems to only retrieve parameters and doesn’t include the path to the file itself (as one gets from the args sent to main())
How can one get at the parameters that are normally passed into the ‘main()’ function?

Thanks


#2

https://www.juce.com/doc/classFile#a3e19cafabb03c5838160263a6e76313dab960741272c75e94482f295a516aae62


#3

Duh. I always think of that stuff for getting to user home, documents, etc. Forgot that one can use it to get current app name as well.
Thanks for the quick answer.