7
Contributors
8
Replies
10
Views
7 Years
Discussion Span
Last Post by mangel.murti
1

Hi,

Here's another option, try using cron jobs.

find /yourdir/tmp -mtime +1-exec rm {}

1 is the xx days.

Regards,
Al

0

If you don't find any joy from the php manual, show us your code and we'll be happy to help. If you want professional help - Google 'php coder hire'.

0

Hi,

Here's another option, try using cron jobs.

find /yourdir/tmp -mtime +1-exec rm {}

1 is the xx days.

Regards,
Al

Don't you need to close the statement after -exec ?

find /yourdir/tmp -mtime +1-exec rm {} \;
0

You want to delete all files from a folder, or want to delete files after x days from creation / last modified date?

0

You can go for "cronjob" for this task.hope you know about cronjob.

logic:
create one table in database.Where fields will be :
id, filePath, deleteDate, status

set cronjob task daily with one php file.
this php file will read table and delete file from filePath on deleteDate and update status.

0

hi ,

all i want to delete files after xx days from a folder using php

thnx in adv..

thanx for all help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.