Del file

70 views
Skip to first unread message

Mars Chak

unread,
Dec 13, 2025, 10:42:38 AM (7 days ago) Dec 13
to Automate for Android
Please forgive my poor English. I want to specify a folder and delete all files older than 15 days. Is that possible?

мJ Zкxy

unread,
Dec 15, 2025, 5:52:01 PM (5 days ago) Dec 15
to Automate for Android
You can use Shell command block for that or ask GPT to create that specific function for you.

Grant M

unread,
Dec 16, 2025, 12:27:06 PM (4 days ago) Dec 16
to Automate for Android
Use the File list block to get an array of all file paths in the directory, then start a For loop of that array. Use the File exists block to get the last modified timestamp of each file, then use an Expression true block with the formula "modifiedAt < (Now - time(24 * 15))". If it's true, then the file is older than 15 days and you can connect the YES dot to a File delete block. Otherwise, the NO dot can connect back to the IN dot of the For block.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages