When you drag and drop a "data" file to your .EXE in Windows Explorer: the .EXE will run, and the name of the data file will be available to the program in the Command() variable.
While testing, you can set a parameter within the Project menu, Properties, Make tab which simulates the input into Command().

If you associate your .EXE with a certain data file extension, and then double click on one of those data files: the same thing will apply - the Command() variable will have the filename in it.

Be aware: The parameter sent from Windows Explorer can be slightly different on different operating systems (short names vs long names), and it can have multiple files within it.