Solved

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

Posted on 2007-03-28
3
5,239 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
ID: 18810268
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
ID: 18812493
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
ID: 19166949
Whatever...
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
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 a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 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