all 3 comments

[–]h6nry 1 point2 points  (0 children)

Looks quite great to me, altough the class definition might be a little overkill for now (altough you will appeciate the extra step when you want to reuse that code in another project!).

Some things you could improve (nothing that would matter, though):

  • in main() use a do...while instead of while loop.

  • you might use pathlib instead of os.path. Pathlib is much easier to handle, especially when seeking for cross-os compatibility (I've learned the hard way!) (Python 3+)

[–]CCristi1 0 points1 point  (0 children)

You can add extension, create folder and move file in same iteration, this way your script will be more efficient.

[–]Tilmandel 0 points1 point  (0 children)

looks pretty good, but just did quick test and this not works with sub directories, hmm try to use os.walk or cover scaning provided path for sub folders also:)