Tuesday 15 April 2014

How to upload local PowerPoint file to SharePoint directory via Python -


I am automating some of my reports and need the ability to upload files to a SharePoint directory on which my Have close access. The target script must be run through the task scheduler (which I already know how to set up).

It is not certain where to begin with this, but I have seen some threads which it is sharingpoint and request modules, but still some are stuck.

Any help is greatly appreciated. Thank you.

I have suggested that the command line approach was eliminated, and I put it together that work Well done:

  Local network drive # os.system ('net use r: {}'. For the SharePoint directory (any open operation works)) format (sharepoint_url) # Upload updates the local file to the SharePoint directory os.system ('copy {} r: \ {}'. Format (output_file_path, output_file_name)) # Disconnect map network drive OSSIMT ('NET Use r: / delete ')  

Hope it helps someone in the bottom line.


No comments:

Post a Comment