I would like to search and locate a file path :: that may be in a different place on each user's machine. Is there a way to implement a search for the file, without pre defining path ?? A way that I can pass the file's name .. All required path, but each user's path is different ?? I attached a pre code::
Any help please
import os
import os.path
path = os.getcwd()
xy=os.path.dirname(path)
name = "NAMEOFFILEIAMSEARCHING.exe"
for root, dirs, files in os.walk(xy):
if name in files:
location=os.path.join(root)
print(location )