I’m beginner to python, trying to automate the daily download process. Filename what we want download will be different every day, so i created a property file with all the names and reading the variable required to download with for loop (date criteria)
cur_date = datetime.date.today()
for line in open(r’C:\Users<user>\Desktop\ConfigFile.properties’):
if cur_date.strftime(’%Y-%m-%d’) in line:
filename=f_name.strip() ## till this it works fine
now i want to pass the ‘filename’ to locator to download, with below am trying, but its not working
It’s unable to read the variable ‘filename’ value, instead it assumes filename as text and trying to search filename and end up failing.
Please let me know how to do this. Thanks in advance