I know the name of the file stored on my pc which I want to open in a web page application. I need the to send the filepath to a html file for the same. So I want to get filepath using the filename in Python or HTML.
I tried using the os.path.dirname(filename) in Python but it didn't work because the attribute is supposed to be a path for this function.
for root, dirs, files in os.walk("/"):
for this. – furaslocate filename
which use database to keep "path/name" of all files and you can very fast find all files with this name (mostly there are more than one paht with this name)` You can use SQLite in Python to do the same. – furas