packager 0 Posted January 3, 2012 Report post Posted January 3, 2012 Hi, What is the best way to make sure files from a folder is regularly deleted ? A script that would do that which can be deployed using SCCM or a script that would be deployed by SCCM that will make use of Task Scheduler ? Quote Share this post Link to post Share on other sites
Peter van der Woude 143 Posted January 4, 2012 Report post Posted January 4, 2012 Depends on the requirements... When all the machines are connected to the network all the time, then I would use SCCM with a rerunning advertisement. Otherwise I would use SCCM once to create a scheduled task, so it will always run even if the machine is not connected to the network.. Quote Share this post Link to post Share on other sites
packager 0 Posted January 4, 2012 Report post Posted January 4, 2012 Hi Peter, I need to run a script on hundreds of machines.This script would delete the files from a particular folder on a weekly basis and on a particular time.Is my follwing steps right ? 1) Create a scheduled task using vbscript or powershell.This would also take care that it runs when the user is logged on 2) Deploy the script using SCCM Or 2) Deploy the script using Group policy All the workstattions are connected to the network all the time. Quote Share this post Link to post Share on other sites
dalle 3 Posted January 4, 2012 Report post Posted January 4, 2012 Hi, If you know that your computers are on all the time then you can have the script on an admin computer or server and make only one schedule. As long as your computers firewalls or policys in any way doesent probit that you access your computers from another computer like \\computer\c$\pathtofiletodelete. If you don't like to create schedule tasks for every computers you can make a script that you run with a group policy when your computers starts and If it's the right day of the month the file is deleted. If you want to use schedule tasks then I think you should deploy them with group policy. Best Regard, Fredrik Wall Quote Share this post Link to post Share on other sites
packager 0 Posted January 5, 2012 Report post Posted January 5, 2012 Thanks Fredrik.Will try. Quote Share this post Link to post Share on other sites
dalle 3 Posted January 7, 2012 Report post Posted January 7, 2012 If you need any help with the script just post a question here and I try to help you. Quote Share this post Link to post Share on other sites