Moving Image from current directory to another using Laravel 3.2

I have one task that will move the product images to one folder.
I have create and validate it using Laravel 2.2 Framework.This will get all the product images validate if the picture existed to the directory if not then display the no.png image otherwise copy the file and move it to the new directory.

$rsProduct = Products::get_ProductByCategoryId2($categoryList->id); // I am getting the records set of the products

$pathFolder = path('public').'menu/'.Products::urlReplaceDefault($categoryList->category_name);

if (!file_exists($pathFolder))
{
mkdir($pathFolder, 0777);
}

echo $categoryList->category_name;

foreach($rsProduct as $item)
{

$urlPath = path('public'). "/path/to/pictures/thumb/".$item->pic;

$newFilename = "";
if (!file_exists( $urlPath ) )
{
$urlPath = path('public'). "/path/to/pictures/thumb/no.png";
$newFilename = Products::urlReplaceDefault($item->title).".png";
}
else
{
if ($item->pic!="")
{
$newFilename = explode('.', $item->pic);
$extension = $newFilename[1];

$newFilename = Products::urlReplaceDefault($item->title);
$newFilename = $newFilename . "." . $extension;

}
else
{
$urlPath = path('public'). "/path/to/pictures/thumb/no.png";
$newFilename = Products::urlReplaceDefault($item->title).".png";
}
}

copy($urlPath, $pathFolder."/".$newFilename);

}