v11 idea del by date

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,586
46
Albuquerque, NM
prospero.unm.edu
#2
I would love to see something that makes deleting files aged by x days so shared areas could be easily maintained.
TCC already has this; type HELP DATERANGES for details. (Ranges can be used in any of the internal file-handling commands, not just DIR.)

Code:
@echo off
*setlocal
*unalias *
 
set n=14
 
alias purge=`if .%1 ne . if isdir %1 pushd %1 && ( del /[dc-%n,1980-01-01] /s /e /x /y /z * %+ popd )`
 
purge "%systemroot\temp"
purge "%temp"
 
endlocal
 
#3
It may be that looking at date ranges will help you do exactly what you
want.
help dateranges

On Thu, Feb 5, 2009 at 10:40 AM, JP Software Forums <[email protected]> wrote:


> I would love to see something that makes deleting files aged by x days so
> shared areas could be easily maintained.
>
--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.