I have a command line program which can be run through the following subprocess.
subprocess.call([CMD.bat, '-infile', infile1.tif, infile2.tif, '-outfile', outfile.tif])
When input files are a few, there is no problem with the above code.
However, when the input files are many, it becomes difficult to input them all. So, I wanted to use glob.glob to input all files.
files = glob.glob("D:\\*.tif")
files = ",".join(files)
subprocess.call([CMD.bat, '-infile', files, '-outfile', outfile.tif])
Unluckily, this code does not run at all. How to solve this problem?
Any ideas, please help.