Drag and drop file or folder into the .bat
file, and it will convert the path of said folder/file into a python variable, which can be used later.
Rename the .bat
file to the same name as your python file in order for it to work (no need to tweak the inside of the .bat
file). And make sure both the .bat
file and the .py
file are in the same directory.
Tested work on Windows 11.