php code:
//Directories to search
$monitor = array(
'/home/admin/Downloads/Downloading/',
'/home/admin/Downloads/',
'/home/admin/ThirdFolder/'
);
//Looking for $release
$release = array('Back.To.The.Future','Forward.To.The.Past','NonExistingFolder');
>>>$delete = array_flip($release); <<<
foreach ($monitor as $path) {
foreach ($release as $name) {
if (file_exists($path . $name)) {
echo $name . ' exists in ' $path;
>>> unset($delete[$name]); <<<
}
}
}
>>>$delete = array_keys($delete); <<<
Dunno if it works, please try