hi, I am trying to access a SharePoint folder which has around 700-1k files. I need to move them all in to an Archive Folder so that fresh files are uploaded. I am using Office365 → Find Files and Folder activity to get the Results loaded with all drive items in that folder. For my surprise it only holds top 199 items where as originally it has more that that. So only 199 are moved to Archive.
If there is a limit you can repeat the process to clear all files 199 items at a time is it not?
In general even if there is no limit, these operations work best when handled in small repetitive batches. The reason I’m saying is that it may be easy to read a list of 1000 files, but moving 1000 files between folders in one to may not be an efficient operation.
Thanks for the response Andy. I’ve now handled it in batches only. But wanted to understand the nature of the activity like, will it always give output only in batches?
Super necessary update is needed. The find files and folders only is limited to a count of 200. And then you can query the filters which makes it kind of useless. Search result limit should be expanded.
Starting with version 1.9.0 there is this new activity available: For Each File/Folder, that allows you to iterate through files and folders, and you can download all the files.
Note: The activity works only for delegated permissions, so it cannot be used with authentication type ApplicationIdAndSecret or ApplicationIdAndCertificate .
Can anyone point me to a tutorial on how to use the For Each File/Folder activity. I managed to set it up to download files from my OneDrive, but I am facing authentication errors with SharePoint. Basically I have my application registered on Azure with delegated read permissions for both Sites and Files. I also generated an application secret.
However in UiPath MS 365 Scope I left the authentication to “Interactive token” as Application & Secret does not seem to work.
Then I placed the For Each File/Folder activity where I use simple search so I pass just the file name (e.g Text.xlsx) I am not sure do I need to do something like String.Format(“filename:”“{0}”“”,FileName)?
Then the search folder is set to “General\Testing” and the SharePoint Document Library is set just to “Documents” as per the below screenshot:
In addition I managed to locate and download a file using the “Find Files and Folders” activity where I set the DriveName as “Documents”. However, this works only for the first 200 files and I need to download 1000+.
I managed to resolve the above error, by replacing the SP site url with a shared url to the folder where my files are located. This worked and I can now download docx files, but the activity completely ignores mp3 and jpg files with no errors thrown. Any ideas? Thanks