r/madeinpython • u/Codex-learn • Feb 26 '21
Automatic Junk File Organizer using Python
https://youtu.be/KBjBPQExJLw
26
Upvotes
0
Feb 26 '21
[deleted]
4
u/Pshivvy Feb 26 '21
Python's sort function will sort by letters if you use it on words. You could potentially use that.
0
6
u/8fingerlouie Feb 26 '21
Why create an else statement ?
It’s better (less repeated code) to check for the existence of the directory before moving the file.
Also, use path.join to avoid accidentally singling out your root directory.
Something like this