Solved

i need a script to dlelete the contents of a folder as a scheduled taks.

Posted on 2007-04-03
3
180 Views
Last Modified: 2010-04-16
i need a script to dlelete the contents of a folder as a scheduled taks.
I  need it to automatically delete all contents including folders.  I have a bat file tha works but does not remove all types of files nor folders.  Also these are large files and contents they need to be permenantly removed so the space is actually freed up no not moved to recylce bin.
0
Comment
Question by:YankeeFan03
  • 2
3 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18847728
What operating system?
Try this:

schtasks /create /ru system /sc daily /st 08:00:00 /tn Removal /tr "cmd /c del c:\BadFolder\*.* /a /q /s"

deletes all files in C:\BadFolder at 8am every day
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18847729
Or, if not xp/2k3,

at 08:00 /every:m,t,w,th,f,s,su cmd /c del c:\badfolder\*.* /s /q /a
should do it...
0
 

Author Comment

by:YankeeFan03
ID: 18854763
will give them a shot today
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question