Python Automation Projects: Automatic desktop cleanup (Part 1)

#Python #Automation #Programming
Python Automation Projects: Automatic desktop cleanup (Part 1)

Part two:

Link to GitHub repo:

“Clean Code Friday”
If you want to receive one short email from me every week, where I go through a few of the most useful things I have explored and discovered this week. Things like; favourite apps, articles, podcasts, books, coding tips and tricks. Then feel free to join


Follow me on:



Secondary Lens –
Secondary Lens –
Zoom Lens –

Ghosts – Ikson


43 thoughts on “Python Automation Projects: Automatic desktop cleanup (Part 1)”
  1. Пытаюсь что-то понять будучи русским… // I'm trying to understand something when I'm Russian…

  2. I made this in under an hour with 10 lines. If anyone wants the code for it, just ask and I'll give you the github link

  3. Am I allowed to take this concept and change it to do something similar and upload it to github?

  4. I worked on commercial software for this but it's not yet complete. Would you b interested in buying it when ready or for featuring it on your site?

  5. Will it work of I copy 1gb file size to desktop?will this code wait till the time file is completely copied on desktop and then move to the desired folder or will it throw error

  6. Anyone else getting this error?:
    UserWarning: Failed to import fsevents. Fall back to kqueue
    warnings.warn("Failed to import fsevents. Fall back to kqueue")

    Have not figured out how to fix it?

  7. Checked the code and tbh it's a bit messy. Your method does too many things. Your file extension object is super repetitive and doesn't follow the dry paradigm. Maybe Powershell would be better tool for this job also. But nice video still.

  8. Great project, but one thing popped into my mind… I usually use the desktop as the desktop should be used, just as a regular physical desktop, so the project im currently working on is active on the desktop, would be a great addition to check out the handling of actual folders that are added, do they just get populated?

    Or even run it as a chron job, so it wouldn't trigger instantly or even ask you if you would want to move the folder/file right away, incase you would like to keep the file on the desktop until your done working on it…

    Again, great project, just spitting out some thoughts and ideas, really like your style of content and your voice is soothing! hehe! keep it up! im gonna go for this project and build it along!

    Best wishes!

  9. how do you improve the oop concept ?? I use a lot of if and for loops, and makes my code look amateur..What can I do??

  10. One tip for renaming files (This is actually what i do most of the time when handling uploads or moving files)

    Use sha1 hash algorithm -> sha1(currentFileName + unixTimeStamp) + '.' + extension
    this will ensure that the files names will be always unique, yes the files names will not make sense but you will speed up process, because when you check if the file exists you are contacting OS do to this check and it is slower process than the calculation of the hash
    If you think hash collisions will happen then you can use sha256 instead of sha1, this method is especially helpful if you do file uploads on the web
    most of the time you will save file to the hard drive and add its file path to the database and if user makes file name too large your app might crash or database error (depends on DBMS, might save it partially or throw an error), this method will ensure what ever the size of the file name is, it will always be 256 bits(64 characters) in length plus the extension and you will not lose space in your database

  11. Like the way you do your videos you really show how it takes to complete a task Google a bit.. debug..copy and paste ..unlike other you tubers who don't show us the whole development cycle

  12. Great vid, But it will be bettre, if u maximise your VS code screen, What is word at last, in the 18th line.

  13. Hi Kalle, Not sure why the audio is a bit low for this video. Would love to see the audio improve in your next video.

  14. Great video! One question: did you consider using the folders that the OS already has? Like “Documents”, “Images” and so on.

  15. Have You ever written tests in python ? You can show how your automation components will be tested.

Leave a Reply

Your email address will not be published.

Captcha loading...