search for file in a whole system code example
Example: search for file in a whole system
import os
def search(drive,name):
for dirpath, dirs, files in os.walk(drive):
if name in files:
return (os.path.join(dirpath, name))
import os
def search(drive,name):
for dirpath, dirs, files in os.walk(drive):
if name in files:
return (os.path.join(dirpath, name))