TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: ALL
from: Chris Johnson
date: 2002-06-12 12:07:24
subject: Re: maximum folder size

Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!supernews.com!feed.textport.net!diablo.netcom.net.uk!netcom.net.uk!kibo.news.demon.net!news.demon.co.uk!demon!edimatrix.demon.co.uk!chrisj
From: Chris Johnson 
Newsgroups: fido.4dos
Subject: Re: maximum folder size
Date: Wed, 12 Jun 2002 12:07:24 +0100
Organization: EDIMatrix Ltd (UK)
Message-ID: 
References: 
NNTP-Posting-Host: edimatrix.demon.co.uk
MIME-Version: 1.0
Content-Type: text/plain;charset=us-ascii;format=flowed
User-Agent: Turnpike/6.01-U ()
Lines: 26
Xref: archiver1.google.com fido.4dos:10

Quoted text is from , by Bucz 


>What you have to do to run a small program to check if size of a 
>specify folder is bigger than limited by program. You want this program 
>to delete the oldest files in order to achieve the size you want This 
>script  will be run once time of day in windows planner proces

Create a .btm batch file which moves to the desired directory, uses 
%@FILESIZE[*.*,b] to find out if the directory is too large. If not then 
exit, otherwise use a FOR to run a gosub which SETS environment 
variables to filename and %@FILEAGE[] if the file age is greater than 
that of the environment variable. Delete the filename stored in 
environment after the FOR has completed. Go back to the filesize check 
to iterate until the directory size is below the threshold.

More sophisticated variants are possible; this is really just a bubble 
sort on file age. :-)

Regards
Chris
-- 
Chris Johnson  +44 (0)20 8501 1490 (home)
EDIMatrix Ltd  +44 (0)20 8559 2454 (work)
                +44 (0)20 8559 2497 (fax)
http://www.edimatrix.co.uk

SOURCE: echoes via archive.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.