
Hello, very new with Power Automate and this is only my second flow.
I create, through another flow, a new file each business day, Monday - Friday, that starts with MM-dd-yyyy in sharepoint Shared Documents/General folder.
This means that business yesterday file is also out there and I want to find it and move it the Archive folder under the General folder.
I have three variables:
1 - DayofWeek - dayOfWeek(utcNow())
2 - NotMonday - formatDateTime(addDays(utcNow(), -1),'MM-dd-yyyy')
3 - IsMonday - formatDateTime(addDays(utcNow(), -3),'MM-dd-yyyy')
My condition looks at the dayOfWeek variable is equal to '1' which would be Monday
If this is true I branch and set the variable NotMonday
then Get Files (Properties Only)
Then I have a Move File taking the Name from the get Get Files (properties only)
I get 'BDRequest' on the Get File step. Any idea, thanks so much!!!
Hi , @chrisvolpe
If you want to filter the filename with startwith() function in Get files action in Power Automate , you need to use code :
startswith(FileLeafRef,'Data')You can replace the 'Data' to your IsMonday to check if it can run scuessfully.
For more information, you can refer to :
Solved: startswith(FileLeafRef,'XXX') finds nothing - Power Platform Community (microsoft.com)
Best Regards,
Yueyun Zhang