Score:0

moving the files from one directory to another in sharepoint using python

dz flag

I am using the below code to move csv files from one directory to another directory it ran successfuly by using cloud function but there is no action in the sharepoint and in cloud function also I am not seeing any error. Can any one findout what is the root cause and please provide the code if possible.

from office365.runtime.auth.client_credential import ClientCredential from office365.runtime.client_request_exception import ClientRequestException from office365.sharepoint.client_context import ClientContext from office365.runtime.auth.authentication_context import AuthenticationContext from office365.sharepoint.files.file import File

ctx_auth = AuthenticationContext(url_shrpt) if ctx_auth.acquire_token_for_user(username_shrpt,password_shrpt): ctx = ClientContext(url_shrpt, ctx_auth) file = ctx.web.get_file_by_server_relative_url(old_url) ctx.load(file) ctx.execute_query() File.moveto(ctx, new_relative_url=new_url, flag=1)

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.