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 and drop the input file on top of the DROP_OVER_ME.bat
batch file and have it pass on the path of the input file to the exe.
This is what my batch file looks like:
@echo off
start bin/my_program.exe %1
exit
When I drag and drop input_file.txt
over the batch file, everything works fine -- my_program.exe
successfully receives the path of the input file and runs.
However, when input_file.txt
is located outside the project folder, dragging and dropping it makes the batch file throw up a popup message saying
Windows cannot find 'bin/my_program.exe'. Make sure you typed the name correctly, and then try again.
How can I fix my batch file so I can drag and drop files from any arbitrary location inside my filesystem?