?
Solved

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

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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

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 …
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

777 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