Aug-08-2020, 03:33 PM
Are you surprised? What else do you think your logic would do:
If you want to do a kind of shuffle logic where the first filename is matched to the first directory, the second filename to the second directory and so on you need to remove the inner loop.
for each filename in filenames_file for each directory in directories_file copy source_dir/filename to directory/filenameThe inner loop
for each directory in directories_file
copies the source file to each of the destination directories before moving on to the next filename.If you want to do a kind of shuffle logic where the first filename is matched to the first directory, the second filename to the second directory and so on you need to remove the inner loop.
for each filename in filenames_file get directory from directories_file copy source_dir/filename to directory/filename