Solved

Batch script - Delete files older than X days with multiple targte folders

Posted on 2007-03-28
3
5,235 Views
Last Modified: 2008-01-09
Hi,

I am looking for a batch file to delete files older than X days

I found one here: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/Q_21887658.html

By SteveGTR which looks perfect but since I have to look in like 30 different folders I don’t want 30 separate batch files, Is it possible to modify this to so you set multiple source directories?
0
Comment
Question by:arundelr
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
SteveGTR earned 500 total points
Comment Utility
The batch processing in that solution accepts an optional directory as a parameter. You could call it from another batch file like this:

call DelOldFiles.bat "c:\temp"
call DelOldFiles.bat "c:\tmp"

Good Luck,
Steve
0
 
LVL 4

Expert Comment

by:mctigue
Comment Utility
i have a way to do it in vbscript with one folder and i'm sure if you know vbscript or vb you could easily make it go through as many folders as you want.
0
 
LVL 30

Expert Comment

by:SteveGTR
Comment Utility
Whatever...
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 …
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 …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

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

18 Experts available now in Live!

Get 1:1 Help Now