DEV Community

loading...

Discussion on: Automating files upload to Microsoft OneDrive. Unexpected challenges and a success story!

Collapse
hkeaylinton profile image
hkeaylinton

Hi, thanks so much this was extremely helpful! My only question is, in this block of code:

Looping through the files inside the source directory

for root, dirs, files in os.walk(cognos_reports_source):
for file_name in files:
file_path = os.path.join(root,file_name)
file_size = os.stat(file_path).st_size
file_data = open(file_path, 'rb')

What is cognos_reports_source?

Cheers

Collapse
jstacoder profile image
Kyle J. Roux

its the directory that holds the files you wish to upload