[go: up one dir, main page]

Menu

[r2]: / cpy / bkren  Maximize  Restore  History

Download this file

29 lines (28 with data), 556 Bytes

#!/usr/bin/php5
<? 
#
#
function delarcvols($arcpath) {  
     $path=$arcpath . ".";
     $handle=opendir($path);  
     while ($file = readdir($handle)) {  
     if ($file == "." || $file == "..") { } else { 
         $sln=strlen($file);
$tg=substr($file,0,$sln-4)."_vola1.tar";
$ck=substr($file,$sln-4,4);
if ($ck==".tar") {
system('mv ' . $arcpath . $file . ' ' . $arcpath . $tg); 
      } 
     } 
}
     closedir($handle);  
     return;  
} 
?>
<?
#main procedure
#
# get parmfile variables needed
$arcpath="/mnt/archive/";
 delarcvols($arcpath);
?>