31
Support and Feedback / Re: How to Drop&Run?
« Last post by Mathias (Author) on May 17, 2024, 20:00:47 »When you drag a file onto an executable file (e.g., a .exe file) in Windows Explorer, Windows passes the full path of the dragged file as a parameter to the executable.
For example, if you have a file named example.txt located at C:\Users\User\Documents\example.txt and you drag this file onto an executable named processfile.exe, the executable will receive the file path as an argument.
When you drag example.txt onto processfile.exe and run it, the output will look something like this:
Argument 0: C:\Path\To\Executable\processfile.exe
Argument 1: C:\Users\User\Documents\example.txt
argv[0] is the path to the executable itself, and argv[1] is the path to the dragged file. If multiple files are dragged, they will be passed as additional arguments (argv[2], argv[3], etc.).
yes Arg1 is the first parameter to the program. argv0 is always the exe of the program it self. it is not something any program sent to it.