How to upload entire folder to Onedrive?

Hi community,
Is there any activity to Upload Folder to OneDrive ?
I just saw only ‘Upload File’ in OneDrive activity.
My requirement is to upload entire folder (include all subfolders and files) to OneDrive.

Thanks.

Hi @tavineei

Use Directory.GetFiles(FolderPath, "*", SearchOption.AllDirectories) to retrieve all files from the folder and its subfolders.
For each file, use the OneDrive Upload File activity to upload the file.
In upload file activity you can pass LocalResource.FromPath(currentfile)

this will upload all the files from folders including subfolder.
I hope this will solve your issue

@tavineei

You dont have that option directly…you need to use loops and uploadeaxh file and even create sub folders and upload

Cheers