Ok,now i found the code from DB reply now,
<?php
$thePath = './bmz_cache/0/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/1/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/2/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/3/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/4/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/5/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/6/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/7/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/8/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/9/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/a/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/b/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/c/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/d/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/e/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';
$thePath = './bmz_cache/f/';
echo '<br />Locating and deleting *.jpg and *.JPG files from this folder: ' . $thePath . '<br />';
$counter = 0;
if ($theDir = @dir($thePath)) {
while ($theFile = $theDir->read()) {
if (is_file($thePath . $theFile)) {
if (preg_match('/\.jpg$/', $theFile) > 0 || preg_match('/\.JPG$/', $theFile) > 0) {
echo '<br />Removing file: ' . $thePath . $theFile;
unlink($thePath . $theFile);
$counter++;
}
}
}
$theDir->close();
}
unset($theDir, $theFile);
echo ($counter == 0) ? '<br />No files found matching the criteria.' : '<br />Done';