ok, so what i\'m trying to do is to scan the \"previous\" folder. $scanned = scandir(\"..\"); foreach($scanned as $file){