Hi, Having sorted most of my upgrade issues, one remains (that worked previously with v4). My code: 01 <?php 02 $filename ="c:\\deliveries\\upload\\jphp.bat"; 03 if($filename){unlink($filename);} 04 $howmany = $_POST['howmany']; 05 $sourcepath="G:\\"; 06 $targetpath="C:\\deliveries\\upload\\"; 07 $counter=1; 08 $cmd = ""; 09 while ($counter <= $howmany) { 10 $source = 'source'.$counter; 11 $source = $_POST[$source]; 12 $target = 'target'.$counter; 13 $target = $_POST[$target]; 14 $counter++; 15 $_source = $sourcepath.ltrim(rtrim($source)).".pdf"; 16 $_target = $targetpath."f".ltrim(rtrim($target)).".pdf"; 17 $copied = copy($_source, $_target); 18 $cmd.="java -cp C:\\j2sdk1.4.2_05\\jre\\lib\\itext.jar com.lowagie.tools.concat_pdf c".$target.".pdf f".$target.".pdf d".$target.".pdf\r\n"; 19 $cmd.="java -cp C:\\j2sdk1.4.2_05\\jre\\lib\\itext.jar com.lowagie.tools.encrypt_pdf d".$target.".pdf ".$target.".pdf \"\" ******** 10100100 128\r\n"; 20 $cmd.="del ".$targetpath."d".$target.".pdf\r\n"; 21 $cmd.="del ".$targetpath."c".$target.".pdf\r\n"; 22 $cmd.="del ".$targetpath."f".$target.".pdf\r\n"; 23 } 24 if (!$handle = fopen($filename, 'w')) {exit;} 25 if (!fwrite($handle, $cmd)) {exit;} 26 fclose($handle); 27 header("Location: [show the ftp folder]"); 28 ?> By the way, the java stuff is a set of tools that allow me to put two PDFs together and then encrypt the final file. Tha batch file then deletes the temp files leaving me with the 'locked' final file to ftp to my server. I get no errors but the file that should have been copied from the mapped 'G' drive just isn't being copied. This worked before the upgrade to PHP 5. Any ideas? George -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php