I’ve created a bat file to provide file path as input to my code where the path is already stored in the .bat file. My code for bat file is:
echo C:\Users\name\Files | C:\Python\Python310\python.exe “ C:\Users\name\Project\main.py”
pause
My python file has:
input_path = input()
print(input_path)
filenames = glob.glob(os.path.join(input_path, “*.xlsx”))
print(filenames)
The following code works fine till printing of input path but print(filenames) prints nothing.
My folder Files has only.xlsx files.
Edit: This was working fine when I was entering the path as input from cmd using argparse but when it reads input from bat file it is not working as it is supposed to.