Variable has a name and a value. During execution, the variable name is replaced with a value.
Variables provide a convenient way of passing parameters between various objects. They also can be used to store settings between sessions.
Using variables to loop through the list of directories
Lists files in directories and saves it into the file.
The file name is saved into the variable.
Loop loads list of files and loops through the list one by one