I have a folder in which I have some files and sub-folders. I need to return the names of the files or relative address (if the file is in sub-folder) that have a given extension, for example .html
.
For example this is structure of given folder:
- /text/something.ncx
- /text/123.html
- content.opf
- toc.ncx
- Flow_0.html
- Flow_1.html
- Flow_2.html
So the code should return this (in an array ideally):
- text/123.html
- Flow_0.html
- Flow_1.html
- Flow_2.html
It's just pulling out names with .html
extension, but I really don't how to solve this.