[arachne] Re: Remove old mail

  • From: ewalt@xxxxxxxx
  • To: arachne@xxxxxxxxxxxxx
  • Date: Tue, 1 Jul 2008 15:55:50 -0400 (EDT)

Arachne at FreeLists---The Arachne Fan Club!

Yeah, he probably thinks that, too--but what he says on his website
is that DOS batch files are limited in capability and that people
should really think about using a more robust scripting language
like Python.






arachne.freelists@xxxxxxxxxxxxxxxxxxxxxxxx said:

>
> Alas, Steve Ferg, author of FDate, has removed it from his site,
> saying that DOS is outdated and we all ought to move on. That was the
> only place I have seen version 16. However, ver 15 is available on
> the Novell Cool Solutions site at:
> http://www.novell.com/communities/node/724/fdate
>
> Jeff
>
>> The batch file is based on #40 in FDATE's EXAMPLES.TXT file. This
>> version sends the older *.SNT files to the TRASH subdirectory.
>>
>> ====================================
>>
>> @echo off
>> :: OLD_SENT.BAT
>> :: to examine each *.SNT files in MAIL subdirectory
>> :: and if older than preset number of days to move
>> :: that file to the MAIL\TRASH subdirectory.
>>
>> if %1'==Process' goto Process
>>
>> :Start
>> :: set mask for max age of files to 15 days
>> set NumDays=15
>> set Count=0
>> set Old=0
>>
>> cls
>> echo.
>> echo OLD_SENT.BAT
>> echo.
>> echo old SENT emails more than %NumDays% days old will be moved to
>> MAIL\TRASH
>> echo.
>> echo please wait.........
>> for %%v in (mail\*.SNT) do call %0 Process %%v
>> echo %Count% Sent messages processed
>> echo %Old% messages more than %NumDays% days old, moved to TRASH
>> pause
>>
>> :: clear variables
>> set NumDays=
>> set DaysOld=
>> set Comparison=
>> set Count=
>> set Old=
>> goto EndIt
>>
>> :Process
>> :: increment count of all files processed
>> c:\fdate\fdate /F#add /A%Count% /B1 /VCount
>>
>> ::  get diff between today's date and file's date
>> c:\fdate\fdate /fdif /a%2 /IF /VDaysOld
>>
>> ::  compare DaysOld with NumDays
>> c:\fdate\fdate /f#comp /A%DaysOld% /B%NumDays% /VComparison
>>
>> :: now move the file if "greater than"
>> if %Comparison%'==GT' goto Trash
>> goto EndIt
>>
>> :Trash
>> :: move old file
>> move %2 MAIL\TRASH\ >nul
>>
>> :: increment count of files moved
>> c:\fdate\fdate /F#add /A%Old% /B1 /VOld
>>
>> :EndIt
>>
>> =================================================
>>
>>     Go placidly amid the noise and haste,
>>     and remember what peace there may be in silence.
>>         "Desiderata", Max Ehrmann, copyright 1952.
>>
>>    ,-./\
>>   /     \ From Greg Mayman, in beautiful Adelaide, South Australia
>>   \_,-*_/   "Queen City of The South"  35d 01'44"S  138d 32'13"E
>>        v
>>
>>                   Arachne at FreeLists
>> -- Arachne, The Premier GPL Web Browser/Suite for DOS --
>>
>
>
>                   Arachne at FreeLists
> -- Arachne, The Premier GPL Web Browser/Suite for DOS --
>
>



                  Arachne at FreeLists                  
-- Arachne, The Premier GPL Web Browser/Suite for DOS --

Other related posts: