thanks a lot !! I just added $dir to $file and it worked :)
In reply to Re^4: Cannot open file within a loop by ic23oluk in thread Cannot open file within a loop by ic23oluk