Hi there @Peter_Chibueze
The emailing part is easy and can be built with logic as required. Use any reviewed Uipath Go component or microsoft O365 inbuilt activites.
For getting ‘all’ files from one directory or sub-directories here is the Syntax -
Directory.GetFiles(targetDirectory, "*.txt", SearchOption.AllDirectories) in an assign statement which has the accepting variable as an array.
*.txt can be replaced by any file-type you want and if you want all file types to be iterated through then you can keep only ‘**’ for the purpose.
If you want only the sub-folders then you can use the following code -
Directory.GetDirectories("yourParentFolderPath") and the resulting array elements will have the full path of the two or more sub-folders that you have in the parent folder. Then subsequently you can iterate through them using
Try and revert if you face any issues.