I am taking path as the input in command line , but it is not taking input from the other directory, my code is this
filename1 = os.path.basename(sys.argv[1])
filename2 = os.path.basename(sys.argv[2])
filename3 = os.path.basename(sys.argv[3])
wk1 = openpyxl.load_workbook (filename1)
wk2 = openpyxl.load_workbook (filename2)
and passing command line arguments like this,
python Final.py "C://Users//Folder One//Folder Two//Input1.xlsx"
"C://Users//Folder One//Folder Three//Input2.xlsx" "C://Users//Folder
One//Folder Four/Output.xlsx"
FileNotFoundError: [Errno 2] No such file or directory: 'Input1.xlsx'
I need to take input 2 files and store the output in third file i.e Output.xlsx. 3rd argument decides the path for the output file.
load_workbook? You pass the full path, so why only use the filename?