I have a batch file and a corresponding text file on another drive (not C: or D:). When I drag the txt file onto the batch file it sees the file as input and processes the text file.
The issue is that I was trying to use subprocess.popen to run the batch with the text file as input. The key thing to understand here is that the batch file calls a perl script with the notation
When I drag and drop the text onto the batch manually, there are no issues. When I try to use popen, I get a "perl is not recognized as internal or external command or program". The weird part is, popen works on my local D drive. But not on the "Q" drive. Except dragging the text file onto the batch (both are in the Q drive) works fine.
So what's happening here. Drag and drop manually works and popen (even with passing the filename as argument to the batch) doesn't work? Except for on my local D drive?
I am providing both the full path of the batch and filename by the way for popen.
file1 = [path]\\test.bat
file2 = [path]\\filename.txt
Note [Path] is a path on another drive. Both files are in the same directory.
#Doesn't work. Gives me perl is not recognized program or command
Drag and Drop into batch #WORKS.