Hello everyone,
I need help uploading a local folder containing multiple files to SharePoint and OneDrive using UiPath. Is there a specific activity or method that can handle this? Thanks in advance!
Hello everyone,
I need help uploading a local folder containing multiple files to SharePoint and OneDrive using UiPath. Is there a specific activity or method that can handle this? Thanks in advance!
you cannot upload a folder directly, you have to loop through the files and upload one by one.
Use upload file activity you can upload each file.. Use this inside for each file in folder and upload..
Before this use, Create folder activity and create it.
Hi @simon.zorde,
UiPath does not provide a single activity to upload an entire folder. The supported approach is to get all files from the local directory using Directory.GetFiles, loop through them, and upload each file individually using SharePoint/OneDrive Upload File activities or Microsoft Graph API.
Thanks & Happy Automation
Hi @simon.zorde
Use For Each File in Folder, then inside the loop use Upload File (SharePoint) or Upload File (OneDrive) from UiPath.MicrosoftOffice365.Activities.There is no single activity to upload a whole folder, files must be uploaded one by one.
Cheers
you can upload multiple files at same time instead of folder
Directory.GetFiles("FolderLocation").Select(function(x) ILocalResource.FromPath(x)) - use this expression in above activity input and it would send all files
note: the size of files might effect upload if its very huge
cheers
Hi, it says frompath is not a member of ILocalRecource
small change
old [quote=“Anil_G, post:5, topic:5698778”]
Directory.GetFiles(“FolderLocation”).Select(function(x) ILocalResource.FromPath(x))
[/quote]
I is extra it should be local resource
Directory.GetFiles("FolderLocation").Select(function(x) LocalResource.FromPath(x))
cheers
Great it works, thank you very much!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.