search entire drive say c:

McColgst mccolgst at gmail.com
Fri Feb 12 14:36:46 EST 2010


>    ROOT = "c:\\"
>    fname = "abc.txt".lower()
>    for p, d, f in os.walk(ROOT):
>      for fn in f:
>        if fn.lower() == fname:
>          print os.path.join(p, f)
>          # break

I think you mean

print os.path.join(p,fn)

-sean



More information about the Python-list mailing list