Solved

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

Posted on 2007-04-03
3
178 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now