Add batch file to PATH
问题 I'm trying to run a .bat file globally by adding the directory which contains it to PATH. This obviously works for exe files but is there a way to run .bat files this way? 回答1: As @SLaks said in his comment, this will work. Based on the rest of your comments, you need to specify the full file name. If there's program.exe and program.bat , you need to enter program.bat and not just program at the command prompt. When you enter program at a command prompt, the shell will first try to execute