I've created a log file for day to day processing and i want to delete the old files generated before 2 days.
In case you use Linux
find /var/spool/sms -mtime +2 -type f | xargs rm -f
All files in /var/spool/sms
older than 2 days will be deleted.
Probably if you are on LInux platform you can use cron .