Computing.Net > Forums > Disk Operating System > new solution del old files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

new solution del old files

Reply to Message Icon

Name: BiTByte
Date: July 2, 2003 at 11:03:07 Pacific
OS: dos
CPU/Ram: 256
Comment:

hi
i added a new feature to my datetime program, now you can add or substract days or month to the current date

in combination with LSFDT and DELFLIST from my page you can delete files older then a generated date

here is an example batch how to delete textfiles (*.txt) older than 2 days

@echo off
::
:: delete *.txt files older than 2 days by BiTByte
::

-----------------------
:: set date1 environment to date before 2 days
datetime @set DATE1=!Y!m!d!-d2 > date1.bat
call date1.bat

-----------------------
:: give LSFDT the parameters to write all
:: older 2 days txt files into dellist.txt
::
lsfdt -m lt -d %DATE1% *.txt > dellist.txt

-----------------------
:: delete the files stored in dellist.txt
::
delflist dellist.txt

tools are free downloadable from downloads at http://plop.at

greets to secret_doom



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: new solution del old files

delete old files by date www.computing.net/answers/dos/delete-old-files-by-date/13057.html

Delete unrequired old files. www.computing.net/answers/dos/delete-unrequired-old-files/12931.html

delete old Files with a batch www.computing.net/answers/dos/delete-old-files-with-a-batch/13459.html