$currentPath = './folder1'; $newPath = './folder2'; rename($currentPath, $newPath);
$currentPath = './folder1'; $newPath = './new_directory/folder1'; rename($currentPath, $newPath);This code will move the `folder1` to a new directory called `new_directory`. The package library for these functions is the PHP Filesystem Functions.