Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

copy_to and copy_to_by_path create target_folder1 next to target_folder

Open MaxiNeis opened this issue 3 years ago • 0 comments

Hi,

analogous to the copy_folder.py example (which is actually a move_to_by_path) I tried to copy a folder from A to B:

Create ClientContext with "https://.sharepoint.com/sites/"

source_folder_url = "/sites//Shared Documents/Playground/A" target_folder_url = "/sites//Shared Documents/Playground/B"

source_folder = ctx.web.get_folder_by_server_relative_url(source_folder_url) target_folder = source_folder.copy_to_by_path(target_folder_url).get().execute_query()

However when doing so folder B1 is created in Playground next to A and B and files are copied into B1. Any other url configuration (ctx and/or target_folder) leads to an exception.

It seems like a bug to me or do I miss something or get something wrong?

MaxiNeis avatar Apr 27 '22 12:04 MaxiNeis