Hi, I have to check if a file is present in a folder. The format of the file name is "Broadband prevet dd-mm-yyyy.xlsx". The date is dynamic here. Can anyone please help how to handle this dynamic date as it would be changing. Iam using Broadband prevet *.xlsx. But it is not working. I want to achieve this on power automate desktop.
You can use a get file activity followed by a parse of the entire list for multiple matches with a regex that checks for "Broadband prevet" followed by either a regex that just finds any date (just search for some online if need be) or create your own custom one , e.g. "Broadband prevet \d\d-\d\d-\d\d\d\d" and there you'll have a list containing all the file paths to the files that you want, that you can do w/e you want to with.
This is a huge limitation of power automate. If you need this functionality JAMS scheduler is a better option.
Since the output of Get files is a list, you have to provide an index for a file path input to work, such as %Files[0]%
Is there a way to read the file using the powerautomate using dynamic file names? it refuses me to use the variable as a file path
This is limited to your specific use case as stated. It will only work if the files you're looking for are strictly in that format. The message displayed at the end shows how it will fail if a file has the same prefix but extra characters after that.
(There's a space after "Broadband prevet ", like that without the quotes.)
Files for test:
Message:
However, this method will eliminate the 'guinea pig' file displayed above:
This will work for your case also, but isn't as flexible.
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2