Hi @Anonymous
Has your problem been solved?
If you want to delete a file based on it's modified date , you can refer to the following screenshots.
I have a folder like this:

Flow in details:


Expression: formatDateTime(items('Apply_to_each')?['Modified'],'yyyy-MM-dd')
Expression: addDays(utcNow(),-7,'yyyy-MM-dd')

After flow runs, the files will be deleted.

Hope the content above may help you.
Best Regards
If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.