Tag: file find
-
[Python] glob package : Search for Files with a Specific Name but You Don’t Know the File Extension
If you want to search for files with a specific name (e.g. “example”), but you don’t know the file extension, you can use the glob module to search for files with a specific pattern. The glob module provides a function called glob() that can be used to search for files with a specific pattern in…
-
[Python] File find by os.path and pathlib
using os.path There are several ways to check if a file exists in Python, one of the most common ways is using the os.path module, specifically the os.path.exists() function. The os.path.exists() function takes a file path as an argument and returns True if the file exists, and False if it does not. Here’s an example…