PHP list of specific files in a directory March 30, 2023 by Tarik You’ll be wanting to use glob() Example: $files = glob('/path/to/dir/*.xml');