python os.listdir doesn't show all files
问题 In my windows7 64bit system, there is a file named msconfig.exe in folder c:/windows/system32 . Yes, it must exists. But when i use os.listdir to search the folder c:/windows/system3 2, I didn't get the file. Here is the test code, in t1.py : import os files = os.listdir("c:/windows/system32") for f in files: if f.lower() == "msconfig.exe": print(f) After run python t1.py , I get nothing. Why the file missed? How can I list all files under a folder? BTW: I am using python 3.3.0 32bit version