How to access a file in the same directory as the program

Hello Everyone,

I have a program executable that I’m going to bundle with my software. I’m going to place this binary in the same folder as my applications executable. Since I need to access the other binary I’m going to execute it and receive information from it using the Shell command), I’m a bit confused. How do I access a file that is in the same directory as my program binary?

dim f as folderitem = Getfolderitem( fileName )

where fileName is the name of your file as s string literal or string variable

Thank you, Norman!
Hmm, OK so that makes sense. Would that also work for Shell? In my case, I want to execute a binary in the same folder as my application binary.

That gets you a reference to whatever it is - program, data file etc
however you may want to use the full path to the item if you intend to start it via a shell JUST to be sure you get the one next to your app
See FolderItem.ShellPath