#!/usr/bin/perl -w
my $srcpath='
my $destpath='
system("chmod 755 $destpath");
system("chmod 755 $srcpath");
copydir($srcpath);
sub copydir
{
my $Path = shift(@_);
print "\n My Path : $Path";
my @arry1=`ls $Path`;
foreach $a ( @arry1 )
{
chomp($a);
print "\n My File : $a";
if(-d "$Path/$a")
{
$Path1="$Path/$a";
print "\nFrom IF : $Path1";
copydir( $Path1 );
}
else
{
print "\n IT IS A FILE";
system("cp -p $Path/$a $destpath");
}
}
}
Number of Hits :
This comment has been removed by a blog administrator.
ReplyDelete