Dec-10-2019, 07:28 PM
I have a Python Script which extracts the data from XL sheet(using Pandas) and finally renames the Output file name into other name.
My config file is in JSON format.
I am passing the 'mv' command as one of parameter in Json file. I am passing Date as the Third argument. Here is how the code(Ignored the other part like data extraction, reading from Json etc. of Python Script, as it was working fine) looks like
"run_cmd": ["mv", "directory/Old_File_name + File_date ", "directory/New_File_name + File_date"]
Kindly help me in this
My config file is in JSON format.
I am passing the 'mv' command as one of parameter in Json file. I am passing Date as the Third argument. Here is how the code(Ignored the other part like data extraction, reading from Json etc. of Python Script, as it was working fine) looks like
import subprocess File_date=sys.argv[3] subprocess.Popen(run_cmd)Json Config for File rename:
"run_cmd": ["mv", "directory/Old_File_name + File_date ", "directory/New_File_name + File_date"]
Kindly help me in this