Introduction
Looping over files and directories helps you do the same task on many files automatically. It saves time and avoids mistakes from doing things one by one.
You want to rename all photos in a folder.
You need to check the size of every file in a directory.
You want to convert all text files to another format.
You want to delete all temporary files in a folder.
You want to list all files and do something with each.