loop throught files in a directory code example
Example 1: php list all files in directory
scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] ) : array
Example 2: bash list all files in directory and subdirectories
# Bash-specific
# syntax
ls -R <file-or-directory-to-find>
# example
ls -R *hotographi*