filenames = os.listdir(dir) -- list of filenames in that directory path (not including . and ..). The filenames are just the names in the directory, not their absolute paths.
import os
dir="c:/"
files=os.listdir(dir)
for path in files:
print(path)
Output :addins
AppCompat
AppPatch
assembly
avastSS.scr
bfsvc.exe