Using the os.walk() module function and match filenames with the fnmatch module. It walks the tree top-down or bottom-up to create file names in a directory tree. It returns a 3-tuple for each directory in the tree rooted at directory top, including top itself, i.e., dirpath, dirnames, filenames.
- Python 3.x
-
Clone the repository or download the
searching_specific_files.py
file. -
Open a terminal or command prompt and navigate to the directory where the file is located.
-
Run the following command to start the program:
python searching_specific_files.py