From: Robert Klemme Date: 2007-01-18T22:10:07+09:00 Subject: Re: Some help with script On 18.01.2007 13:22, R.Smits wrote: > Hello, > > I am not good with ruby , but I must change something in a script. Can > someone help me in the right direction ? > > ------------------- > def initialize > # This is the directory where amavisd-new stores the quarantined > emails. > @directory = "/home/amavis/quarantine" > @dateline = (Date.today - 1).strftime("%Y%m%d") > @report_date = (Date.today - 1).strftime("%d/%m/%y") > # This is the file pattern used to match the quarantined spam > # emails in the quarantined email directory. This is used so that > # only spam (and not virii etc.) from the report day are matched. > @file_patt = "spam-*-#{@dateline}-*.gz" > @spams = Array.new > ---------------------- > The directory with the spamfiles I need is in > /home/amavis/quarantaine/2007-01-17-spam > > But this should always be yesterday ! > > Files in this directory are like : spam-prAizOahLojn.gz > (Anything with spam-*) > > I should change something like : Date.today - 1 > But what date syntax ? I don't understand: the script reads already "Date.today - 1". So what is your problem? Regards robert