import os
source_dir = r"C:\Users\wilin\Downloads"
with os.scandir(source_dir) as entries:
for entry in entries:
print(entry.name)
import os
source_dir = r"C:\Users\wilin\Downloads"
with os.scandir(source_dir) as entries:
for entry in entries:
print(entry.name)