How to count number of files in a SharePoint folder?

Hey! Any idea on how to count the number of files present in a SharePoint Folder?
Thank you.


Is that share point folder is synced to your local machine
Because we got an option to sync that folder to our local with a SYNC option in the share point
—once after syncing then we will be able to access the file from that folder synced with our local machine itself
And to find the count of files in that folder we use a assign activity like this
int_filecount = Directory.GetFiles(“yourfolderpath”).Count

Where int_filecount is a variable of type int32

Cheers @jadbenn

Hi @Palaniyappan,

Thank you for your answer.
Is there any way to do it in the SharePoint Scope, without sync?


we can try with sharepoint activities UiPathTeam.SharePoint.Activities

Cheers @jadbenn

If the SharePoint Activities doesn’t have what you are looking for you can always scrape the Documents page save it to a DT and use DT.Rows.Count to find the number of files