Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy_to_using_path not working #527

Closed
shinenazeer opened this issue Jun 24, 2022 · 2 comments
Closed

Copy_to_using_path not working #527

shinenazeer opened this issue Jun 24, 2022 · 2 comments
Labels

Comments

@shinenazeer
Copy link

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)

@shinenazeer shinenazeer changed the title Copy_to_using_path not working for me Copy_to_using_path not working Jun 24, 2022
@shinenazeer
Copy link
Author

someone please help

@vgrem
Copy link
Owner

vgrem commented Sep 7, 2022

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

@vgrem vgrem closed this as completed Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants