Re: directory exists
kind of ugly:
<at> filelist=`ls`;
while($file=shift( <at> filelist)){
chomp($file);
$part1=substr($file,0,4);
$part2=substr($file,4,2);
$part2=~ s/^0//;
$part3=substr($file,6,2);
$part3=~ s/^0//;
$dir=$part1."_".$part2."_".$part3;
if(-d "../testdir/$dir" ){
print $dir;
}
}
On Wed, Dec 2, 2009 at 8:53 PM, Kaushal Shriyan
<kaushalshriyan@...> wrote:
> On Thu, Dec 3, 2009 at 12:19 AM, Roger <roger.in.eugene@...> wrote:
>> On Wed, Dec 2, 2009 at 3:00 AM, Kaushal Shriyan
>> <kaushalshriyan@...> wrote:
>>> Hi,
>>>
>>> I have binary files 20080630 under a particular directory
>>> (/mnt/data1/adserver/BinaryAdLogs) and there is a directory by the
>>> name 2008_6_30 in /mnt/data1/adserver/DailyLogs
>> Does it always drop the leading 0 for month? (assuming that's
>> Year_month_day). Does it drop leading zero for the day, ie, if it's
>> 20080609, does it go to 2008_6_9 ?
>
(Continue reading)