cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IceQueen
New Member

2021 SharePoint - Deleting Files In Folder After X Days

Hello, I am struggling to get files deleted in specific folders after 90 days. I looked at similar posts but they used an "Advance Condition", which I could not find on the current version of SharePoint. Is there a way to implement this feature? If so, please show a step-by-step procedure. 

 

What I tried doing, but it didn't work

IceQueen_0-1623362302969.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-LilyW-msft
Microsoft
Microsoft

Hi @IceQueen 

Thank you for posting.

Due to the software update, there is no Advance Condition now, You could use expression on both sides of Condition to achieve your needs.

I have tested it on my side and it can delete the file that 14 days after modified in the folder. You can change 14 to 90.

Please refer to as below:

v-LilyW-msft_0-1623388613302.png

The Expression on the left of Condition:formatDateTime(item()?['Modified'],'yyyy-MM-dd')

The Expression on the left of Condition:formatDateTime(addDays(utcNow(),-14),'yyyy-MM-dd')

v-LilyW-msft_1-1623388613309.png

After Flow runs. The file master student list will be deleted.

v-LilyW-msft_2-1623388613313.png

v-LilyW-msft_3-1623388613316.png

Hope the content above may help you.

Best Regards

Lily

View solution in original post

1 REPLY 1
v-LilyW-msft
Microsoft
Microsoft

Hi @IceQueen 

Thank you for posting.

Due to the software update, there is no Advance Condition now, You could use expression on both sides of Condition to achieve your needs.

I have tested it on my side and it can delete the file that 14 days after modified in the folder. You can change 14 to 90.

Please refer to as below:

v-LilyW-msft_0-1623388613302.png

The Expression on the left of Condition:formatDateTime(item()?['Modified'],'yyyy-MM-dd')

The Expression on the left of Condition:formatDateTime(addDays(utcNow(),-14),'yyyy-MM-dd')

v-LilyW-msft_1-1623388613309.png

After Flow runs. The file master student list will be deleted.

v-LilyW-msft_2-1623388613313.png

v-LilyW-msft_3-1623388613316.png

Hope the content above may help you.

Best Regards

Lily

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (20,892)