Re: Handle date structured folders

2006-08-16 Thread John W. Krahn
John W. Krahn wrote: > Khairul Azmi wrote: >>On 6/23/06, John Ackley <[EMAIL PROTECTED]> wrote: >>>Khairul Azmi wrote: I have this problem. There is a script that stores log files into folders that follows structure of the following /MM/DD eg.. /var/log/projec

Re: Handle date structured folders

2006-08-16 Thread John W. Krahn
Khairul Azmi wrote: > > On 6/23/06, John Ackley <[EMAIL PROTECTED]> wrote: >> >> Khairul Azmi wrote: >> > I have this problem. There is a script that stores log files into >> > folders that follows structure of the following >> > >> > /MM/DD >> > >> > eg.. >> > >> > /var/log/projects/2006/06/2

Re: Handle date structured folders

2006-08-16 Thread Dr.Ruud
"Khairul Azmi" schreef: > Thanks for the code. However it does not works as expected. It should, because you stated that it will run once a day. Remove the older files (folders?) by hand, once? Or just put a loop around it: for my $days (2..14) { ... }. Further: don't top-post, and snip all n

Re: Handle date structured folders

2006-08-16 Thread Khairul Azmi
Thanks for the code. However it does not works as expected. My testing shows that the program will only unlink folders if the structure name of the folders falls exactly on the range. Say today is 16 August 2006. If I have only have this folder /var/log/project1/2006/08/08/8231.tgz The progra

Re: Handle date structured folders - CORRECTIO

2006-06-22 Thread John Ackley
argument 2 of DateCalc() should be "$days days ago" NOT "$days ago" sorry John Ackley wrote: Khairul Azmi wrote: Hi all, I have this problem. There is a script that stores log files into folders that follows structure of the following /MM/DD eg.. /var/log/projects/2006/06/20/8231.tgz

Re: Handle date structured folders

2006-06-22 Thread John Ackley
Khairul Azmi wrote: Hi all, I have this problem. There is a script that stores log files into folders that follows structure of the following /MM/DD eg.. /var/log/projects/2006/06/20/8231.tgz /var/log/project1/2006/06/21/1432.tgz /var/log/projects/2006/06/22/1756.tgz /var/log/projects/20

Re: Handle date structured folders

2006-06-22 Thread Chad Perrin
On Thu, Jun 22, 2006 at 04:45:25PM +0800, Khairul Azmi wrote: > Hi all, > I have this problem. There is a script that stores log files into folders > that follows structure of the following > > /MM/DD > > eg.. > > /var/log/projects/2006/06/20/8231.tgz > /var/log/project1/2006/06/21/1432.tgz

Re: Handle date structured folders

2006-06-22 Thread Mr. Shawn H. Corey
On Thu, 2006-22-06 at 16:45 +0800, Khairul Azmi wrote: > Hi all, > I have this problem. There is a script that stores log files into folders > that follows structure of the following > > /MM/DD > > eg.. > > /var/log/projects/2006/06/20/8231.tgz > /var/log/project1/2006/06/21/1432.tgz > /var/