Sharepoint file uploader/downloader using Office365-REST-Python-Client library
When sharepoint library cannot be mapped as regular network drive using "service" account and only Azure APP can access it due to sharepoint security settings
Usage:
_$ ./python.exe sharepointToolkit.py --help
usage: sharepointToolkit.py [-h] -s SITE
(-d DOWNLOAD [DOWNLOAD ...] | -u UPLOAD [UPLOAD ...] | -l | -all DOWNLOADALL [DOWNLOADALL ... ])
[-dest DESTINATION] [-dir DIRECTORY] [-del]
Sharepoint File Tools - download/upload file from/to sharepoint site and list library contents
optional arguments:
-h, --help show this help message and exit
-s SITE, --site SITE Enter sharepoint site name
-d DOWNLOAD [DOWNLOAD ...], --download DOWNLOAD [DOWNLOAD ...]
Enter file name(s) to download
-u UPLOAD [UPLOAD ...], --upload UPLOAD [UPLOAD ...]
Enter file name(s) to upload/optionally use * wildcard (e.g., "D:\tmpDir\test\*.txt", or, to recursively dive into subfolders use "D:\tmpDir\test\**\*" )
-l, --list List library contents
-all DOWNLOADALL [DOWNLOADALL ...], --downloadall DOWNLOADALL [DOWNLOADALL ...]
Enter Sharepoint folder name to get all contents of
-dest DESTINATION, --destination DESTINATION
Enter destination library/folder when uploading to
Sharepoint
-dir DIRECTORY, --directory DIRECTORY
Enter local subdirectory within D:_tmpShareDrive,
e.g. -dir "GL_Extracts\APR19"
-del, --delete
Deletes file(s) from Sharepoint if option specified when downloading_
Credits:
Vadim Gremyachev https://github.com/vgrem/Office365-REST-Python-Client