Delete older files

Post your questions and help other users.

Moderator: Martin

Post Reply
anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Delete older files

Post by anuraag » 31 Dec 2016 15:56

How to get file date? I know there is a option in Init Variable File List.

I would like to delete files older than 7 days. Currently i am using Init Variable File List to determine older files and running weekly. Is there any other way to do it?

seb
Posts: 13
Joined: 12 Jan 2015 21:36

Re: Delete older files

Post by seb » 02 Jan 2017 14:49

Hi,

I want to do exactly the same.

I use FolderSync to backup pictures from my phone to my NAS.

I would like to get rid of local pictures older than 6 months through Automagic, as FolderSync only allows to delete files successfully synced immediately.

@anuraag: mind sharing your recipe?

Thanks!
Seb

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Delete older files

Post by anuraag » 03 Jan 2017 05:50

I have created this flow using my rough knowledge about scripting.

You need to edit script and modify days_old as per your need.

I have added debug before delete action to check output.
Attachments
flow_Delete_files_older_than_x_days_20170103_111646.xml
(4.25 KiB) Downloaded 1097 times

seb
Posts: 13
Joined: 12 Jan 2015 21:36

Re: Delete older files

Post by seb » 03 Jan 2017 08:14

Thanks, this is perfect!

I changed it a bit so I get a notification of deleted files and update the media library after deletion.

cornelius59
Posts: 3
Joined: 09 May 2015 13:53

Re: Delete older files

Post by cornelius59 » 18 Jan 2017 20:20

Thank you anuraag it is that i want to do !!!!

Post Reply