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

    CONTACT: [email protected]

    Follow me on:



    CAMERA –
    Secondary Lens –
    Secondary Lens –
    Zoom Lens –

    Ghosts – Ikson


    Previous articleSimple way to remember Session, resource and client objects of boto3 for AWS Automation ?
    Next articleHadoop Introduction in Telugu || Big Data in telugu || Data in Telugu || Kotha Abhishek


    1. 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!

    2. 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