#check if the $dir does not exits then we create it if(!-d $dir){ mkdir($dir);}