I have a list of files and I need PAD to look at this list and give me the list item that matches a wildcard ("SGC").
Is there a way to do this?
I tried "Remove item from list" with the Value of anything that doesn't end in "SGC" but it didn't like the syntax.
From experimenting, I've been able to parse a list with a regex wildcard but instead of giving me the list item where it found the "SGC" match, it simply stored the matched text.
Suggestions appreciated 🙂
1) 'Get files in folder' to get the list of files (%Files% as output variable)
2) 'For each' CurrentItem in Files
3) 'If' %CurrentItem% (First operand) Does Not Contain (operator) 'SGC' (Second operand) then
4) 'Remove item from list' > Remove item by Value, With value = %CurrentItem%, From list = %Files%
5) 'End' (If's end)
6) 'End' (For each's end)
At the end, %Files% will have only items with 'SGC'.
Hi @MTIncPower ,
You can Try in this way
Get files in folder' to get the list of files (%Files1% as output variable)
For each CurrentItem in %Files1%
If' %CurrentItem% (First operand) Does Not Contain (operator) 'SGC' (Second operand) then
Remove item from list' > Remove item by Value, With value = %CurrentItem%, From list = %Files1%
End (If's end)
End (For each's end)
At the end, %Files1% will have only items with 'SGC'.
If it works Please mark as a solution, so it will help even others also.
Are all the files in one folder to begin with? The "Get files in folder" command has a file filter.
File filter *SGC should only pull in those files. This says, it must end in SGC to be pulled in to the list.
Update: Adjain is correct...unless the file ends in .SGC, you will need the * after.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.