Hi!
I 've written the code below.
There is a problem with "rename": i have the message: "permission denied".
Nevertheless, I have all the rights.
What 's happen ?
Franck
___________________________________________________________________________
#!/usr/bin/perl -w
$now=time;
opendir (INFO,"l:/01_informatique") || die " impossible d'ouvrir le
r�pertoire 01_informatique: $!";
while ($fic=readdir INFO)
{
next if ($fic eq "." or $fic eq "..");
if (($fic=~/^c/) && ($fic=~/htm$/))
{
open (FICHIER,"l:/01_informatique/$fic") || "erreur: $!";
$age1=(stat(FICHIER))[9];
$age2=int(($now-$age1)/3600/24);
rename
("l:/01_informatique/$fic","l:/01_informatique/$fic.old") || die "renomage
impossible: $!" if ($age2>365);
close FICHIER;
}
}
close INFO;
____________________________________________________________________________
_
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]