i have a requirement where in i need to delete all the old log files in a folder.Log file will be having the extn of .log. But the thing is recent log file need not be deleted . For example if i have a folder say xyz and inside that foleder i have 3 log files named 1)currentlog.log 2)currentlog_2010.log 3)currentlog_2011.log and some other .txt files with some names are also present.please note , currentlog.log is the recent logfile .So this need not be deleted. i need to delete all the other log files that has the name pattern 'currentlog*' .Pleasenote ,the recent logfile and other .txt files should be retained.on trigering the perlscript only currentlog_2010.log ,currentlog_2011.log should get deleted.How to do this?
In reply to deleting a file in perl by keralaqueen234
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |