Automatically Delete Files In A Directory
Posted on 2007-11-19
I have a shared folder on one of our servers (Windows 2003 Server Enterprise) for our patrons to temporarily store files in case they don't have their flash drive with them. In the past with our old server (ie, before I was here) the shared folder was emptied every night around 11pm by some automatic process. I cannot find any info on how it was done before I got here so I am throwing it out to the Experts.
The only issue is that users can create files or folders. We want to clear everything out, but there is always one folder we want to show up (let's call it "files"for this senario). I don't mind if the process is to clear out everything in the folder and recreate the "files" folder (there shouldn't be anything inside of it anyways). But the process does need to run independent of user interaction though.
So I am open to a script and scheduled task, or a software application, whatever will be simple and easy to implement. Thanks!!