Solved

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

Posted on 2007-04-03
3
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.

726 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