Dec-18-2021, 11:44 AM
Well, offcourse there will be a better way or at least a different way. But I think I would be helpfull to organize your code a little first. I'm sure your code will work eventually, but putting al those actions, if statements etc. in just one script makes it hard to read, but more important it makes it hard to add new code.
For example, the loops you use for searches in folders could be a function that returns a value such as True or False. The function will be reusable as many times you want, no matter how many folders you want to search.
I do realize this is not a perfect answer to your question. But it is quite difficult to do suggestion for your code without having to rewrite it from the start. Working with smaller pieces of code will help to do suggestions.
For example, the loops you use for searches in folders could be a function that returns a value such as True or False. The function will be reusable as many times you want, no matter how many folders you want to search.
I do realize this is not a perfect answer to your question. But it is quite difficult to do suggestion for your code without having to rewrite it from the start. Working with smaller pieces of code will help to do suggestions.
- Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. Albert Einstein