Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Batch file to delete all MP3s from sub directories-

Posted on 2007-03-28
2
Medium Priority
?
1,171 Views
Last Modified: 2007-03-28
I need a Batch file to delete all mp3 files from all sub folders under c:\homedir\ but retain directory structure.
Students download mp3's during the day, and I would like to have a script to automatically delete all of the mp3, exe, or zip files that they shouldn't be downloading anyway-
I guess this could also be writtin in vbs but I prefer batch- Can anyone help me with this?

Also I will be running this directly from the storage server so that it can run quickly at night. This will probably deter a lot of them from moving music to my storage server-

Thanks!!
-Charlie
0
Comment
Question by:Boomer7638
[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 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 18810870
del /s C:\homedir\*.mp3
0
 

Author Comment

by:Boomer7638
ID: 18811821
You make it sound soo easy- Thanks for the quick reply- I may just run this twice a day and push the output to a text file named date/time.log so I will know which files were deleted (and which students are doing things they shouldn't be).

I guess that's what I get for not even looking first huh- Thanks again!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to dynamically set the form action using jQuery.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

730 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