Make a file paste the code and run it.
Code: Select all
<?php
delete_files('/home/admin/web/website.com/public_html/wp-content/cache/comet-cache/cache/');
function delete_files($target) {
if(is_dir($target)){
$files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned
foreach( $files as $file )
{
delete_files( $file );
}
rmdir( $target );
} elseif(is_file($target)) {
unlink( $target );
}
}
?>