Hi All,
Can anyone please help me to how to select the folder based on the EmpID(six digit number)
Count of the folder must be 30K count.
could you please suggest me the best approach to filter the specific folder.
What do you mean “select the folder?” You aren’t doing UI automation (ie click, etc) in Windows Explorer, are you? If you want to interact with folders and files there are activities for that.
Assign filteredFolders = (From folder In folderList
Let empIdPart = folder.Split("-"c).LastOrDefault()
Where empIdPart IsNot Nothing AndAlso empIdPart.Length = 6 AndAlso empIdPart.All(Function(c) Char.IsDigit(c))
Group By folder Into Group
Where Group.Count() = 30000
Select folder).ToList()
Assign filteredFolders = (From folder In folderList
Let empIdPart = New String(folder.Where(Function(c) Char.IsDigit(c)).ToArray())
Where empIdPart.Length = 6
Select empIdPart).ToList()
I have attached the input folder structure in the top of the ticket,
In workflow also try to use the assign activity the output variable type was declared as you mentioned.
Output=System.Collections.Generic.List(System. String)
Please find the attached xaml. In this xaml we check for the folder is aviliable or not and later we check the count of the files in a particular folder.
Note:- I wanted to provide some clarification regarding about counting files in a particular folder. My understanding is that in order to accurately navigate and retrieve the file count for a specific folder, it’s essential to use the full path.
Without the complete path, the system may encounter difficulties in locating the specified folder, leading to potential inaccuracies in the file count. Therefore, for precise results, it is recommended to provide the full path when requesting information about the files in a particular directory.
Still if you have any doubts please reach out to below link.
Link:- https://youtu.be/LHNWeyamat8(This video will pop out by 3-Jan-2024 5PM onwards)