How do I read the number of files in a specific folder using Python? Example code would be awesome!
total = len(filter( lambda f: os.path.isfile(os.path.join(path_to_dir, f)), os.listdir(path_to_dir)))
OR
total = sum([True for f in os.listdir(path_to_dir) if os.path.isfile(os.path.join([path_to_dir, f)])