I want to loop through directory and process the files in them.
I do this with the following code.
for (root, subdirectories, files) in os.walk(dirDialoog.GetPath()):
for file in files:
My problem is that the files processed 2 times.
I tried the next code, but in that way the files weren't selected because the subdirectory is empty.
for (root, subdirectories, files) in os.walk(dirDialoog.GetPath()):
for subdirectoryNaam in subdirectories:
Anyone a suggestion how to solve my problem?