J jimklein Dec 21 0 2009-02-05 #1 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. Jim
Charles Dye Super Moderator May 5,387 166 Staff member 2009-02-05 #2 jimklein said: I would love to see something that makes deleting files aged by x days so shared areas could be easily maintained. Click to expand... 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
jimklein said: I would love to see something that makes deleting files aged by x days so shared areas could be easily maintained. Click to expand... 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
J Jim Cook May 603 0 2009-02-05 #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. > Click to expand... -- 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.
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. > Click to expand... -- 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.