Office365-REST-Python-Client
Office365-REST-Python-Client copied to clipboard
Copy_to_using_path not working
source_folder_url = "/sites/sitename/Shared Documents/old/1"
target_folder_url = "/sites/sitename/Shared Documents/new"
source_folder = ctx.web.get_folder_by_server_relative_url(source_folder_url)
target_folder = source_folder.copy_to_using_path(target_folder_url,True).get().execute_query()
print(f"File copied into {target_folder.serverRelativeUrl}")
Showing error: requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://domain.sharepoint.com/sites/sitename/_api/Web/getFolderByServerRelativePath(DecodedUrl=%7B'DecodedUrl':%20'/sites/sitename/Shared%20Documents/new'%7D)
someone please help
I confirm it was a bug with Folder.copy_to_using_path method, thank you for reporting it. It has been resolved in 2.3.14 version