Created
August 20, 2021 08:01
-
-
Save hyunjong-lee/e0f97aa0e4c353c65c31b596765ee641 to your computer and use it in GitHub Desktop.
List directories and files using Office365-REST-Python-Client library
just add
for file in folder.files:
print(file.name)
def enum_folder(parent_folder, action):
"""
:type parent_folder: Folder
:type action: (Folder)-> None
"""
parent_folder.expand(["Folders", "Files"]).get().execute_query()
action(parent_folder)
for folder in parent_folder.folders:
enum_folder(folder, action)
for file in folder.files:
print(file.name)
@anjanesh Great, Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@JavierMedel Can you give me the result of the following code?
The library contains exactly same code as mine as a example.