Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done v11 idea del by date

Dec
21
0
I would love to see something that makes deleting files aged by x days so shared areas could be easily maintained.

Jim
 
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
 
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.
 
Back
Top
[FOX] Ultimate Translator
Translate