I have a folder structure that looks like this:
project bin my_program.exe misc_stuff.exe DROP_OVER_ME.bat input_file.txt
Basically, I want to be able to drag the input file over the batch file DROP_OVER_ME.bat and transfer it along the path of the input file to exe.
This is what my batch file looks like:
@echo off start bin/my_program.exe %1 exit
When I drag input_file.txt over the batch file, everything works fine - my_program.exe successfully gets the path to the input file and starts.
However, when input_file.txt is outside the project folder, dragging it causes the batch file to pop up with a message
Windows cannot find "bin / my_program.exe". Make sure you type the name correctly, and then try again.
How can I fix my batch file so that I can drag and drop files from any arbitrary location inside my file system?
Michael0x2a
source share