Hey, I posted about making new directories and the mkdir thing worked out after setting everything up correctly to work with the mkdir. However, when I try to upload (really it's just coping to another folder on my computer while I test it) it doesnt work. Whenever I try to upload files over 1 meg, my HTML doc works very slowly then after a long time finishes working, yet the file has not been copied. Smaller files however, work fine.<br>Please help.<br>Source code below.<br>-----------------------<br>## path to where files uploaded.<br>$basedir = "c:/test";<br><br><br>## allow all file types? yes/no<br>$allowall = "yes";<br><br>## If the above = "no"; then which is the only extention to allow?<br>$theext = ".txt";<br><br>## The page to forward to when done:<br>$donepage = "<A HREF=" TARGET="_new"> CGI; <br>$onnum = 1;<br><br>while ($onnum != 11) {<br>my $req = new CGI; <br>my $file = $req->param("FILE$onnum"
; <br>my $filedir = $req->param("filedir"
;<br>if ($file ne ""
{<br>my $fileName = $file; <br>$fileName =~ s!^.*(\\¦\/)!!; <br>$newmain = $fileName;<br>if ($allowall ne "yes"
{<br>if (lc(substr($newmain,length($newmain) - 4,4)) ne $theext){<br>$filenotgood = "yes";<br>}<br>}<br>if ($filenotgood ne "yes"
{ <br><br><br>mkdir ("$basedir/$filedir",0777);<br>open (OUTFILE, ">$basedir/$filedir/$fileName"
; <br>print "$basedir/$fileName<br>";<br>while (my $bytesread = read($file, my $buffer, 1024)) { <br>print OUTFILE $buffer; <br>} <br>close (OUTFILE); <br>}<br>}<br>$onnum++;<br>}<br><br>print "Content-type: text/html\n";<br>print "Location:$donepage\n\n";<br>