Skip to content

Instantly share code, notes, and snippets.

@nolim1t
Created June 2, 2009 02:43
Show Gist options
  • Save nolim1t/121949 to your computer and use it in GitHub Desktop.
Save nolim1t/121949 to your computer and use it in GitHub Desktop.
Show all txt files in the Downloads directory
<?php
foreach (scandir("Downloads") as $f) if ((substr($f, -3, 3) == "txt" || substr($f, -3, 3) == "csv") && stristr(strtolower($f), "errors")) echo $f."\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment