Power Automate Gallery
Add Flow
Using multiple OR conditions in a IF statement (1)
First approach, using multiple conditions in IF statement
Flow Actions
Folder.GetFiles Folder: $'''C:\\YOUR_FILE_PATH''' FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files LOOP FOREACH CurrentItem IN Files Text.RegexParseForFirstOccurrence Text: CurrentItem TextToFind: $'''\\w{3}-\\d{4}.*\\.pdf''' StartingPosition: 0 IgnoreCase: False OccurrencePosition=> Position Match=> Match IF (Match = 'ABC-1235.pdf' OR Match = 'ABC-1236.pdf') = $'''True''' THEN File.Delete Files: CurrentItem END END
See second approach (using a list):
https://power.automate.gallery/LIhE73Pp1sy4
Author
PAG Admin
Flow Variables
Flow Datatypes