How can I automatically delete /tmp folder on shared drive?

Posted by Matt on Server Fault See other posts from Server Fault or by Matt
Published on 2012-12-19T16:08:54Z Indexed on 2012/12/19 17:04 UTC
Read the original article Hit count: 249

We have a /tmp folder that people use for temporary stuff. It can be anything and any file.

We want to make it so that this automatically deletes (or preferably MOVES to another folder on the same shared drive) all the files that haven't been accessed in the last two weeks. This should happen weekly on a schedule that I don't have to manually do.

Is there software out there that does this? Anyone have a script possibly?

Server 2008R2

© Server Fault or respective owner

Related posts about windows-server-2008-r2

Related posts about scripting