Hello team,
I have a requirement where the bot needs to upload around 700+ files into a SharePoint for each queue items. Is there any way to bulk upload the files from one folder in local into a folder inside the SharePoint. Currently, i am using looping to get each files and then use “Upload Files” activity under Integrations>Microsoft365 activities to upload these file one-by-one. The issue is that this is taking too much time and is checking for an alternate solution. Requesting your help
Kindly note that the SharePoint location cannot be synced into local profile due to enormous size consumption.
**Unfortunately no option to bulk upload the files to SharePoint.
You can also zip the files and upload but we will have to unzip them again once uploaded.
Update: Thank you @Anil_G, @Achiranga for highlighting that we can upload multiple files.
I tried this and yes, we can upload multiple files in one go. There isn’t any definite number of files but give it a try by splitting in chunks as Anil mentioned.
Here is how you can pass multiple files to Upload File
Get all the local file full paths in an string array
use this expression in Files property of Upload File activity strArrayFilePaths.Select(function (x) LocalResource.FromPath(x))
Thanks so much for the quick response @ashokkarale . If i presume correctly, we won’t be able to unzip the file inside the SharePoint using any activity as well right? Please let me know. Thanks so much again
Regarding the multiple file option, yes it can support multiple files by adding them into arguments as shown below . I have tested it with 5 files and haven’t seen much speed improvement while doing this vs loop each file & upload (Not sure and this may be due to small data set being used for testing)
I haven’t been able to figure out how to get a collection to be passed into this argument so that the files are loaded at once. Additionally, the number of files inside the folder will be dynamic “Add entry” option might not be suitable here. I am not sure how i can get to build an IResource object collection from local file so that i can try passing it here. Requesting your expertise to see how this can be done, if possible.