I want to add this script to an ArcToolbox for a coworker, so that they can reorder a table's columns after exporting a table to excel. They are not savvy with code, so I'm trying to just provide them with a way to enter the file, and the path for the result.
I've tried to set the input as a file, and the output as a location, so that the tool will create a file at the output location using the 'Tool Properties' in ArcCataloge.

import pandas as pd
from pandas import DataFrame
from datetime import datetime
DY = datetime.now()
yr = DY.year
mt = DY.month
def reIndexContracts(inputFile, outFilePath):
df = pd.read_excel(inputFile)
df = df.reindex(columns=['col1','col2', etc...])
df.to_excel(r"{0}FileName{1}_{2}.xlsx".format(outFilePath,mt,yr))
if __name__ == "__main__":
reIndexContracts(arcpy.GetParameter(0),
arcpy.GetParameter(1))
Unfortunately, I get an error back that the file location does not exist, and it cites the entire path and file with the extension in the error. For example:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\user\\Desktop\\the\\outpath\\FileName10_2022.xlsx"
What am I missing here? Hoping to just put a file and a path in, get a file out.