Today, I’m just curious, and I’m wondering if there is a way that the “Filter by name” property of this activity could accept multiple strings. The case is that I want to use a ‘For Each’ loop in a folder that has 20 folders inside, but I want to skip just one of the folders (whose name I know). I tried adding an array variable to the property with the names of the folders, but the property only accepts strings.
Please note that I know I could make this work by simply adding an ‘If’ inside the loop that checks for the name of the folder I don’t want to process. However, I’m just curious to know whether I can achieve this using only the properties of the activity itself.
In case it can’t be done, then it would be nice if this activity had these functionalities:
Accepting collections for the ‘Filter by name’ property so we can skip certain folders by their name or adding more of a condition property like some ‘For Each’ activities have.
An option to decide whether the name of the folder(s) we input in the properties is to process or to skip.
Folder = Directory.GetDirectories("folder_fullpath")
Folder = Folders.Where(Function (x) Not New FileInfo(x).Name.Equals("To delete Name Folder")).ToArray
You also can remove using method StartWith, EndWith, Regex etc
Very useful @rikulsilva
Even though the ‘Filter by name’ property doesn’t accept enumerables, So I won’t be able to enter the folders array into the property.