?
Solved

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

Posted on 2007-04-03
3
Medium Priority
?
188 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 2000 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

862 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