Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi
i added a new feature to my datetime program, now you can add or substract days or month to the current datein 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.txttools are free downloadable from downloads at http://plop.at
greets to secret_doom

![]() |
![]() |
![]() |

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