Find File location - simple console file
import sys import os, fnmatch def find(pattern, path): result = [] for root, dirs, files in os.walk(path): for name in files: if fnmatch.fnmatch(name, pattern): result.append(os.path.join(root, name)) return result a = find(sys.argv[1], sys.argv[2]) print(str(a[0])) # Return the 1st result as string (change this if you want an array with multiple files)
Comments