Hi Guys,
I again have a problem with PERL. I am trying to fetch the files which are inside the folder in my workarea.I am trying to get the list of those files so that i can extract certain metadata from it.Here im only able to get the 1st level files and im not able to browse through the files inside the folder.
Following is the code snippet.
my $localizer = TeamSite::JavaResourceBundle->new();
my
@bundles = $localizer->load($this_dir,"deletion","properties",0)or die "deletion.properties not found";;
my $vnew = $localizer->format('folder_path');
$n=1;
$count=1;
opendir(DIR, $vnew) || return(undef, "Error: Directory $vnew not found!");
my
@files = grep {/\.xml$/ && ($_ ne '.') && ($_ ne '..') } readdir(DIR);
closedir(DIR);
my $temp =
@files;
foreach $e (
@files) {
$temp = $vpath.'/'.$e;
$path = $vpath.'/'.$e;
$temp = `iwextattr -g metadata $temp`;
@v=split(/\//,$temp);
@v_rev=reverse(@v);
$v_rev=join("",
@v_rev);
if ($v_rev<$sysdate) {
print $fhandle1 "\n$count: $e \n $path: -
@v_rev \n \n ----------- \n";
$count++;
}
$n++;
}
Can anyone please help me in browsing throught the files inside the folders?