Auto delete files after certain age?

I have my network surveillance camera set to up load saved video every night. Is there any way to set up a script to auto delete files older then 30 days on the mycloud. I would only have to run it once a week to keep the file numbers down.

Any hints or tips??

Thanks,

Hello,

Unfortunately the My Cloud does not have this as an option. Let’s see what other users can comment on this.

bustedbudget wrote:

I have my network surveillance camera set to up load saved video every night. Is there any way to set up a script to auto delete files older then 30 days on the mycloud. I would only have to run it once a week to keep the file numbers down.

 

Any hints or tips??

 

Thanks,

That would be pretty simpel using a bash script or perl.

Maybe you can motivate Ralphael

However, I do not think that with current firmware you will be happy with MyCloud.

I think you can make CRON entries into MyCloud. 

Here’s an example of a CRON entry which should delete files older than 30 days although I have not tested it.  You’d have to SSH into your MyCloud and enter something similar to this via crontab -e

0 0 * * * find $HOME/foldername/ -name ‘*’ -mtime +30 -exec rm {} ; >>

This will run everyday at midnight and will delete files in $HOME/foldername older than 30 days.