Это видео недоступно.
Сожалеем об этом.

Start Automating Your Life Using Python! (File Management with Python Tutorial)

Поделиться
HTML-код
  • Опубликовано: 14 авг 2024
  • Sign up to Morning Brew for free today morningbrewdai...
    What I love about coding is that it’s not just a skill that can help you build an interesting and lucrative career, but also something that you can use to actually solve real problems that you have in your daily life.
    🚀 MY COURSE to Become a Python Developer from SCRATCH - bit.ly/487zzzc
    Working With Files in Python (article) - realpython.com...
    Watchdog (Python Library) - pythonhosted.o...
    My Python File Downloads Automator Code - github.com/tuo...
    And that’s what automating your life with Python allows you to do, so in this video I will show you how to get started with learning to teach your computer to do the boring and menial tasks you do every day, and we’re going to be doing that via a simple project to automatically organise your computer’s downloads folder.
    You might ask, do I need to use Python, and if so why Python?If I know C, Java or Javascript, can I use those to automate my life? And yes, you probably can use other languages, the reason why Python is usually used for these types of applications is that it's easy to learn, has an active community, and has tons of libraries to cover many automation needs.
    In addition it’s very simple to write and understand and sort of does a lot for you so you don’t need to worry about low level details like memory management or types for example.
    The only downside of Python is that it’s much slower than something like C, but for these simple automation scripts that doesn’t really matter.
    But yes, you can probably use other languages, you just need to check that the language has the ability to touch your computer’s file system for example.
    I do recommend using Python. It’s a very nice and sleek language.
    MY FREE COURSE
    🚀 How to Successfully Learn to Code and Become a Software Developer - A Step-by-Step Framework - skl.sh/3WvgSzZ
    🧠 Sign Up to my Newsletter to get my Free Online Computer Science Degree Template - academy.intern...
    OTHER STUDY & CODING RESOURCES
    💰 BEST CODING COURSES. Use Code FRIENDS10 for 10% off - academy.zeroto...
    ➕ BEST DATA STRUCTURES & ALGORITHMS COURSE - academy.zeroto...
    📗 BEST BOOK TO PASS CODING INTERVIEWS - amzn.to/3i8B8EK
    MY BLOG
    📗 JOIN MEDIUM TO ACCESS MY BLOG CONTENT - / membership
    📸 FOLLOW ME ON INSTAGRAM - / tuomaskivioja
    WHO AM I?
    This channel documents my life as a Self-Taught Software Engineer as well as my journey teaching myself Computer Science & Programming.
    CHAPTERS:
    0:00 Solve Problems using Code
    0:50 Why Python?
    1:34 SPONSOR: Morning Brew
    2:37 What We're Going to Build
    3:45 Where to Start when Building Projects
    4:30 TUTORIAL: File Downloads Management Automator
    11:00 Why I Love Automation Projects
    11:40 How to Use Shell Scripting
    DISCLAIMER: some of the links in the description may be affiliate links. If you purchase a product or service using the links that I provide I may receive a small commission. This is no extra charge to you! Thanks for supporting Internet Made Coder :)
    Tags: python automation projects, automate the boring stuff with python, learn python, python automation, automate your life, learn python fast, python fundamentals, bash scripting, learn to code, coding projets, coding project ideas, python tutorial, desktop automation, coding tutorial, python 101, how to automate tasks for beginners

Комментарии • 403

  • @InternetMadeCoder
    @InternetMadeCoder  2 года назад +47

    Tell me your Python automation ideas!!!
    Sign up to Morning Brew for free today: morningbrewdaily.com/internetmadecoder

    • @sherryzia6770
      @sherryzia6770 2 года назад +2

      a to-do program

    • @skzyr8865
      @skzyr8865 2 года назад +4

      A program that evaluates the code from your project and generates new functionality easily, in order to save coding times.

    • @bryanst.martin7134
      @bryanst.martin7134 2 года назад +1

      I have 2. A phone/tablet accessible ESP controller. One a BMS to monitor power usage on a vehicle battery bank, and another to operate valves to deflate/inflate vehicle tires on a multi purpose truck. The tire function is probably a PID mode.

    • @PsyTale
      @PsyTale 2 года назад +1

      Use automator ans shortcuts. Save more rime.

    • @janpedersen9120
      @janpedersen9120 2 года назад +2

      Find some website with something you want to buy when price changes.. so in general get a notify when price changes :)

  • @sotirioskapartzianis235
    @sotirioskapartzianis235 2 года назад +490

    Btw, there's also a book called "How to automate the boring stuff with python", which teaches you how to do these kinds of tasks

  • @smittywerbenjj1
    @smittywerbenjj1 2 года назад +304

    This is not a tutorial about File Management with Python.
    This is a tutorial about how bring your Ideas to code step-by-step, which is a very important skill. very nice 👍

    • @neanea5899
      @neanea5899 Год назад

      Holaa Jesus is coming back soon! I’m telling you, only 1 name gives life: JESUS! 2 or 3 years ago i was depressed and suicidal and one day when on tiktok I encountered the love of JESUS. The Unconditional saving love of Jesus. You see, we are all sinners, the Bible says it, in “Rom 8;28: For all have sinned amd fallen short of the glory of God” we have all at some point in our life turned away from God, but god does not want us to be separate from him. You, God is holy and a righteous person who lives in heaven and made all and most imporgantly cares for all.("1Peter: Cast all your cares upon Him, for He (God) cares for you" have strayed form Him into the devils trap of temptation to sin, which we will all one day be judged for . I beg you, please turn away from sin, becaue it will send your soul to hell. So , you see the result of sin is death and eternal separation form the goodness of God, which is a terrible matter, because this leaves us with the fire and wrath of hellfire. Thats why Jesus died. The only son of the living God ,Jesus Christ loved you enough to give His life for you, so that instead of dying, you would be saved and obtain a place in Heaven, not by your good works, but by the works of christ himself. (Jn 3 :16 For God so loved the worñd tjat He gave His One and Only begotten Son, tnat whomsoever believeth in Him shall not perish but have everlasting life") . This is applicable only if you repent of your sins!, which i beg you to do.

  • @RoboDragonJediKnight
    @RoboDragonJediKnight 2 года назад +179

    You might consider running this as a background process. You could do research onto running scripts as a long running background process. In addition you might consider scheduling this "background script" to run at startup of your computer. Areas of research include "MacOS launch agents" (fancy name for background process; you might also hear the term daemon in Mac world managed using launchd) or crontab to run programs on a schedule.
    An alternative you could consider "Startup Apps" which you could search for in MacOS ecosystem that might be a bit more user friendly to get a program to run at startup.
    Note you could further refine that as MacOS isn't my daily driver, so there might be a better way to accomplish your goal of further automating your system. As is the case with any problem, there are multiple solutions.
    The benefit of running it in the background is that you don't have an extra terminal window minimized.
    The benefit of running at startup is that you need not start the script manually.
    Great video 👍

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +19

      Yes, thank you, this is something that I was looking for!

    • @anthonymendoza6528
      @anthonymendoza6528 2 года назад +2

      in your experience are scripts like this light weight, it seems like the WATCHDOG library is handling all that in the background. but is that a high frequency loop

    • @ColeCoug
      @ColeCoug 2 года назад +2

      Do you know how much processing power running a background process like this would use? I am wondering if there is a way to just run the sorting script once everytime something appears in the download folder instead and if that would even be worth it?

    • @RoboDragonJediKnight
      @RoboDragonJediKnight 2 года назад +2

      @@ColeCoug Not sure. One way to test that empirically would be using a process manager to monitor cpu and memory usage. If that doesn't work, you could do some simple logging and performance analysis of the python code and then determine whether your performance is acceptable. You can do some research on the aforementioned topics and you'll probably have an answer.

    • @RoboDragonJediKnight
      @RoboDragonJediKnight 2 года назад

      @@anthonymendoza6528 I haven't looked into implementation of WATCHDOG. I would imagine under the covers, yes, it's high frequency loop that checks for changes over time and allows a programmer to program a system in an event-driven way (on_modified in this case). This is what GUIs do if you have any experience with event listeners and handlers GUI programming (javascript, event loop, etc.).
      As for performance, you could analyze it empirically with performance monitor would probably be the way to go. I would imagine it's pretty lightweight. Computers are fast these days :)

  • @masqueradinglampshade4369
    @masqueradinglampshade4369 2 года назад +28

    LOVE your description of what got you excited about coding. How you describe having a "superpower" that allows you to tell your computer to perform highly-specific tasks in a way that makes it like having an "unpaid virtual assistant you have access to at all times." You took the words right out of my mouth with that one. That's exactly what excites me about Python, too. Great video!

  • @ansgar7824
    @ansgar7824 2 года назад +61

    I see you hard coded the differentiation for the type of file based on the file extension. Python actually comes with a library for fetching or guessing the MIME-Type of a file, which not only determines the general type (e.g. text, picture, video), but also the subtypes as text/css. It’s simply called mimetypes.

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +15

      oh really, good to know!

    • @neanea5899
      @neanea5899 Год назад

      Jesus loves you, but all have sinned and fallen short of the glory of God, and He is coming back soon, so please repent of your sins and follow Christ today. Biblical prophecy is coming true. Jesus Christ, the Only Son of the Living God

    • @220SouthlandAve
      @220SouthlandAve 3 месяца назад

      @@neanea5899 Coming from a fellow Christian, what in the absolute f*** does this have to do with anything this video was intending to present?
      If you're wanting to automate posting evangelical comments (or replies) onto RUclips videos, you should at least have your automator check the context of the video somehow first lol.

    • @luxuryhagama
      @luxuryhagama Месяц назад

      @@neanea5899 shut up please, thanks; this is a youtube video on programming, not bible study

  • @bobans
    @bobans 2 года назад +11

    The first thing you need is a trigger for the downloads folder, something like, if the downloads folder contains an image, move image to the appropriate folder or if the downloads folder contains video, move video to appropriate folder. Really awesome video. Gave me a lot of ideas of how to automate daily tasks with python. Will definitely subscribe.

  • @Reecepbcups
    @Reecepbcups 2 года назад +15

    If you want it to always run, setup a CRONTAB job to run every say, 10 seconds. You put the absolute path of the file there and it will run it in It’s directory.

  • @paulmilakeve
    @paulmilakeve 2 года назад +17

    As usual you did a great job balancing information with showing actual use cases

  • @jaycesardo5616
    @jaycesardo5616 2 года назад +3

    I used pyautogui (a Python automation module) and cURL to download practically all images from a website (almost 3,000+ images) and automated the process of saving every layer from Photoshop. That's how great python is.

  • @hoochiecoochieman5505
    @hoochiecoochieman5505 2 года назад +6

    I'm a smart but a lazy person, I can't even tell you the lengths I'd go to have a chance to be a bit lazier on a daily basis. When I first started to learn a little bit of programming, my essential goal was to automatise my work, which was writing some really generic texts. Although the work I was doing changed a little bit after that, I liked programming and now I'm thinking about having it as a career path. Still a long way to go, but working on it every day and I'm sure I'll get there one day.

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +1

      I'm the same as you, ambitious but lazy at the same time haha. That's one of the 3 main reasons why I love programming, I talk about that more on next week's video

  • @brainsniffer
    @brainsniffer 2 года назад +6

    Great video, and a great thought. I’m big on automating, but I always focus on the big things and forget there’s micro-automations that could improve my life like this.
    One suggestion I have is, maybe the event that’s triggered that says that a file changed has a property that tells you which file, and you may not need to scan the directory. That would make sense to me, but I’m not as familiar with python to say for sure. Also, you possibly want to make sure the file isn’t still downloading, but most downloaders these days have a temp name and then change to the real name when finished.

  • @VamsiKrishna-pp4fy
    @VamsiKrishna-pp4fy 2 года назад +4

    In windows cmd
    > md "pdf folder"
    > move *.pdf "pdf folder"
    We can do similarly for other file types also

  • @kamel3d
    @kamel3d 2 года назад +7

    You could run it periodically as agent in the background I have used it before it is very easy to set up just edit the plist file for that

  • @tizioacaso3933
    @tizioacaso3933 2 года назад +4

    I don't know if you've found the solution on how to run your program on background i've found one (bc i've done what you've done only with shows, anime etc...) and here it is: you can rename the extension of your python script file to pyw, after that you create the executable and after you run it it will be created as a process in background that you can close through the task manager and if you want it to be started at the start up of your pc you can press WIN+R and type in "shell::startup" and place inside your .exe

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад

      I see, I'm on mac though, might be a different process. But there are many other solutions suggested in this comment section for mac, just haven't got arounf to doing it haha

  • @ShaneFozard
    @ShaneFozard 2 года назад +3

    Great video. Thanks.
    I made the mistake of running the program w/o having created the folders so it moved all the files to a file (not a folder) of the same name, but was unusable. Essentially I lost all my files.
    Fortunately I had a backup, restored all files and rectified my mistake and it worked perfectly.
    Thanks.

    • @jd2161
      @jd2161 Год назад

      Lesson learned lol

  • @sandman4485
    @sandman4485 2 года назад +5

    When you're downloading a file in windows, it creates both an extension file and a part download file, and on completion it merges into a single file. Will this delay of download cause the program to move the extension to the folder before it finishes downloading and get corrupted?
    If yes, how would one fix that?

  • @blackburn32197
    @blackburn32197 2 года назад +5

    Thank you for sharing. I think for me and most beginners is it is easy to get overwelled with programing. This video has made my life a little bit easier.

  • @efesonmez7662
    @efesonmez7662 2 года назад +21

    That was a great video. As someone who recently started to learn python, especially for data and web design. Your videos are very inspiring. Maybe you can make a video about designing our own website using Django

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +1

      Great to hear! Perhaps I will

    • @s-codes14
      @s-codes14 2 года назад +1

      @@InternetMadeCoder isn't Django used for api's and not for web designing

    • @its_nihar
      @its_nihar 2 года назад +1

      @@s-codes14 yes we can use django to make APIs

    • @brevanpharaoh
      @brevanpharaoh 2 года назад +1

      @@s-codes14 Djangois used for website front and backend, not just for APIs.

    • @s-codes14
      @s-codes14 2 года назад

      @@brevanpharaoh I had no idea, but I'll do some further research, I just thought Django was for the backend only.🤔

  • @dhyeyy
    @dhyeyy 2 года назад +3

    the consistency is crazyyy man 💙

  • @gabrielblanco2969
    @gabrielblanco2969 2 года назад +28

    Quick tip, if you want to make those paths from line 9 to 13 work for more users you can use os.path.expanduser('~') to get the home directory in a dynamic way

  • @koimipoimi5483
    @koimipoimi5483 2 года назад +2

    Aattelin et äijäl vähä suomalaist aksenttii mut sähän oot suomalainen! Hyvä video, tilaukseen meni.

  • @SaulEduardoo2
    @SaulEduardoo2 2 года назад +1

    I liked your video!!... Just a quick doubt, I didn't understand the last part about how to keep the script running 🤔

  • @mehdisheriff
    @mehdisheriff 2 года назад +9

    Great video!
    Btw, for those wondering, there is a way to do this without any coding knowledge through Automator which is an app on every mac.
    Jeff su highlighted this in one of his recent videos

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +3

      Oh really haha, oh well at least this was a great exercise😂

    • @mehdisheriff
      @mehdisheriff 2 года назад +2

      @@InternetMadeCoder yeah defo. Great practice project

  • @Zain-ks8ws
    @Zain-ks8ws 2 года назад +3

    I always thought that copying code off of the internet is not good, and I was worried that it would not help me learn, but your video made it look fine; as long as it works, there is no harm.

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +2

      definitely no harm at all!

    • @orangutex468
      @orangutex468 Год назад

      it is not harmful it just make sense why make code if someone else has already made it

  • @e11world
    @e11world 2 года назад +4

    This is very awesome and got me thinking of something I've wanted to do for a really long time (automating adding meta tags to files once they are in a certain folder such as in this video's example having tags for music files as music and sfx for sound effects where I currently use mp3tag program on Windows to do this manually).
    For this though I need to know a bit more about starting with Python first. This is a good start too.

  • @marckramer5365
    @marckramer5365 2 года назад +2

    You can use launchd to start your program automatically when your system starts.

  • @ward7576
    @ward7576 2 года назад +1

    When the event is called for file "appearing" in the folder, it's ambiguous to scan the directory for files to find the one you need. It already gives you the filename, the folder is already given and, unless a bit switch happens due to cosmic rays, your program won't fail to see that - yes, file exists and move it since it exists.
    Of course, unless, again, race condition happens and that file happens to suddenly disappear between it being found and acted upon.

  • @jasonhowardak
    @jasonhowardak 2 года назад +5

    I would consider making an array of file types and then look in the array to match the file type for video, images, documents, etc rather than using many if or

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +1

      agree, someone kindly did that for us on the Github repo

  • @alienhon
    @alienhon 2 года назад +6

    It's a really great video. I really Loved your approach towards coding,and using it for day to day lives. I just to know what all extensions do you use in your vs code

  • @thealpacaofsupport258
    @thealpacaofsupport258 Год назад +1

    I am studying coding at my university, we have been learning about stuff like WinApi to do windows using C++ and stuff
    Just a couple of days ago I realized I could be using what I am learning for stuff I need to do in my daily life, and no just using this knowledge at homework and school projects
    This video was very interesting and fun! I enjoyed it a lot ^^

  • @PoeLemic
    @PoeLemic 2 года назад +3

    This is a really good and helpful video. I have helped teach a class on computers (not like this stuff), and this Guy has done a really good job of teaching. He's got a great future on RUclips doing this. I sure hope he keeps posting more projects like this that people can learn from. Maybe, he could even have a Q&A videos where people ask him how to do something, then he shows us.

  • @vaisakhkm783
    @vaisakhkm783 2 года назад +1

    youcan add tessract ocr to automatically name your images from keyword within the file :)

  • @max_porush
    @max_porush Год назад +2

    Great video! In regards to keeping it running, the best solution imo would be to have it automatically run whenever opening a browser. Simplest way that I could think would be to write a simple script that runs both that you rename / change icon to your preferred browser.
    If you think about it, it’s unlikely that you’d be downloading files without browsing the internet and on the off chance that you downloaded a couple files from something like discord, this should organize them as soon as you run a browser (probably pretty often). I’m not sure if there’s also a way to have it stop running when you close a browser but maybe someone else in the comments would know.

  • @ikiguy07
    @ikiguy07 2 года назад +5

    First, Congratulations 🎉🥳 for 57k subs...
    Second, That's what we wanted mate!!! Tutorialsssssas!!!!!! For some real projects (I haven't learn python yet but I'll learn it in future saving this in my watch later)

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +1

      thanks so much!! And yeah, people have been asking for these, more coming in the future!🔥

  • @theinnerlacedmystic
    @theinnerlacedmystic Год назад

    having this run in background is a waste of resources, but at shutdown!! thanks mate!!

  • @walkerkler
    @walkerkler 3 месяца назад

    Good video. I decided to write my own version of the script. I have added a bit more to mine, ensure files are completely downloaded before moving the files. Run each file download on its own thread so that faster file downloads done have to wait until longer downloads are completed first. Added a timeout for each file download, I used tuples for my extensions..why...Tuples are immutable (not chanegable) and allows for the use of the membership operator "in". All in all, what seemed as a simple program to just copy a file turned out into researching how to do several things in python...which is the point...

  • @leonard_9500
    @leonard_9500 2 года назад +2

    I wish I could automate my OCD obsessions. I'd be free finally.

  • @MuhammadAhmedAshraf
    @MuhammadAhmedAshraf 2 года назад +4

    what's the meaning of initializing npm and initializing express initializing session what does this means in backend development

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад

      No idea

    • @nikos4677
      @nikos4677 2 года назад

      it meqns to make anew priject and install express what you dont understand?

  • @edgarmendoza3838
    @edgarmendoza3838 2 года назад +7

    Excellent video… thanks for the content, im going to create some tasks like that… regards from Mexico

  • @furkan9864
    @furkan9864 2 года назад +2

    wonderful video man, thanks a lot

  • @pixqode
    @pixqode 2 года назад +4

    Great approach to the coding 👍thanks..btw which code editor are you using..

  • @AdityaSharma-fx1jx
    @AdityaSharma-fx1jx 2 года назад +3

    A really informative video as expected and greatly explained......BTW what happened to your thumb

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад

      Thanks! Haha, dw it’s fine I just cut it a bit😅

  • @Kinos141
    @Kinos141 2 года назад +8

    How bout one better. Make python list all file exts and create folders for those exts. If you want, you can create a list so that the code groups similar files, like jpg and pngs.
    Edit: I just did what I proposed. Thanks to this video.

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад

      great idea, I think the updated code in the github repo has something similar

  • @lexcrob1
    @lexcrob1 Год назад

    Been getting bogged down with learning python took a break to find real world application. That was awesome!!

  • @amoralmemes
    @amoralmemes 2 года назад

    This is the clearest training I've ever seen

  • @jaydeepkadam
    @jaydeepkadam 2 года назад +3

    Sir , bring more videos automation.
    Very interesting and detailed videos 👍👍👌👌

  • @AshoxNr1
    @AshoxNr1 2 года назад +3

    Haha I already planed to write the same program to keep my downloadfolder clean before I've seen this video! It seems i'm not the only one who is pissed of about the missing function for doing this :D But nice explanation bro, realy helpful!

  • @nxzthelinuxguy5192
    @nxzthelinuxguy5192 2 года назад +2

    You can setup a cron job which can basically run that python script every minute

  • @barrybatsma8947
    @barrybatsma8947 Год назад

    I love how honest u are ;) like i also searched it on the internet.

  • @DoorThief
    @DoorThief 2 года назад +3

    2:58 at this point in the video I got the urge to build a windows service that monitors for new file creations in my downloads folder, determines their MIME type, if the mime type doesn't match the file extension it would replace it, then it moves the new file into a directory with the extension name.

  • @RudyBanks
    @RudyBanks 7 месяцев назад

    I wrote a batch script that moves my files to folders based on the file extension. Not running in background but one click and boom all files cleaned up.

  • @ThomHemenway
    @ThomHemenway 2 года назад +1

    You probably should use a compiled language for this so you can start this program up on startup for Windows

  • @Casey74
    @Casey74 Год назад

    After getting bogged down with the program, it keep review on what I was doing wrong and then... Finally got it to work. @Internet Made Coder was totally right, it does feel good when you build something for yourself to solve a problem. Thanks bro!

  • @Later_Nerd
    @Later_Nerd Год назад

    The thing about programming is it's not as simple as people make it out to be. There's a ton of marketing saying everyone can do it and sure, at some level, everyone can do it. But to push past that entry level skill it is difficult. There are a lot of concepts that are difficult to wrap your brain around and it's unlike anything else. You have to rewire your brain in some instances just to finally start to understand bits and pieces. There will be times where you are starting at your computer monitor just mad because you've been stuck at a wall for an hour or two. Nothing you try works. Then once you finally find a solution then there is an immense sense of satisfaction. If you don't feel that sense of satisfaction then you should find another industry because you need that in order to not get burnt out.
    It's also really easy to get stuck doing tutorial after tutorial and never really learning the material on your own. You will learn a lot more going through a tutorial and then trying to implement those ideas without a video holding your hand. It will be hard, you will be googling things like crazy and it will probably suck. But that's how you actually learn. Figuring out how to Google your problems and find your own solutions is a very relevant skill in itself in this industry. Nobody is expecting you to remember every line of syntax. But you should be expected to find the answer, or at least something relevant to the answer by searching online. By finding problems in your life that you want to solve, that will keep you doing real world projects and putting those concepts you've worked so hard in real world use. Without that will to find these answers and solve these problems you won't make it in this field. I've seen it hundreds of times. People get enticed by the dollar signs and job security. While that all is true, you have to reach a certain level in the industry for it to be the case. If everyone could truly do it then these jobs wouldn't pay to much.
    Just a realistic take on programming. The marketing from a lot of companies would lead you to believe that it's very easy and that with a can do attitude you can be making $250k a year in 6 months and that is not at all the case for 99.9% of people.

  • @wongkitlongmarcus9310
    @wongkitlongmarcus9310 2 года назад +2

    great! i am exactly looking for ideas like this

  • @Dacoljr
    @Dacoljr 2 года назад +4

    "just like asolving any programing problem... you go to google" 🤣🤣🤣

  • @gustavojuantorena
    @gustavojuantorena 2 года назад +12

    Great video! Quick improvement: You can use a tuple as argument of "endswith()" method, so you can define all the possible extensions without the chained "or".
    example:
    name.endswith((".mov", ".MP4"))

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +5

      Oh thanks, didn’t know that!

    • @kingz4038
      @kingz4038 2 года назад +1

      That’s cool, I’m learning python rn and just learnt about tuiles. Could to see they are actually useful.

    • @sarimbinwaseem
      @sarimbinwaseem 2 года назад +2

      Thanks for improving my knowledge Gustavo

  • @cutezafar99
    @cutezafar99 2 года назад +1

    Great approach to the coding

  • @Yutaro-Yoshii
    @Yutaro-Yoshii 2 года назад +2

    With shell, we could just `mv *.mp4 ./vids`
    But I digress, this is a beautiful introduction into coding everyone was wishing for.
    If you could pick up this thinking process, you can basically make anything!

    • @Yutaro-Yoshii
      @Yutaro-Yoshii 2 года назад +1

      Also, if you want to make your script execute every now and then, you may want to look into launchctl on mac, and systemctl on linux (sorry don't know the equivalent on windows). Those things are called service workers or daemons, and it starts up when your computer boots up.

  • @terae4775
    @terae4775 2 года назад +1

    I actually did this, (before i watched this video). Even with GUI, it's called TeraFileMover.

  • @marana.th4
    @marana.th4 2 года назад +1

    yesss do the shell scripting bit pleaseeee

  • @midknight3350
    @midknight3350 2 года назад

    Quick question: What would you look for on a job listing if you want to automate a job?

  • @jaykjellberg5274
    @jaykjellberg5274 2 года назад +3

    Okay alright! Since I am finally a bit faster than usual. I have several questions, my mate:)
    I am like 28 yo and I am a CMO at somewhat big it company. I am thinking to transfer a little bit to somewhat coding. Because more and more when you do marketing you actually need some decent coding skills. (have similar to you background actually, also studied Economics :)
    so questions:
    -how long you actually been coding? because what i see now, you seem like a decent programmer at this point with decent skills.
    -future of automation (my biggest fear tbh, because I am aware that IT can be automated way faster since its all in the cloud already, and we have tonnes of data. Just have a look what Dall-e 2 can do, mindblowing). I mean if it will take me 2years to get to a decent level, isn't it too little too late?
    I-cant really figure out your stack of technologies?)
    -and how long it took you (really) to be that good with RUclips?:)
    Ty in advance mate, big fan. Cheers from your ex-neighbor from Saint-petersburg. (because of the current situation had to leave for another country, unfortunately:)

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +4

      Thanks for the comment Jay!
      1. Now almost a year. I do some coding most days but not every day.
      2. Def not too late. If you are referring to programmer jobs being automated, I don't think that will ever happen (could be wrong here ofc). Once you get into coding, you'll notice that a lot of it is actually quite a creative endeavour. You need to solve problems, which you need a human brain for. Actually writing the code is actually less important than figuring out how to write it.
      3. I wouldn't say I stick to a stack, I use Python a lot, then Javascript for web stuff, dabbled with Swift for mobile, and I also did some C as part of CS50 + Java as part of an Algorithms course.
      4. Haha, thank you, really it took over a year. I had a different channel before this one for a year which was a complete failure. But it was great practice :).
      Good luck if you decide to get into coding!!

    • @jaykjellberg5274
      @jaykjellberg5274 2 года назад +1

      @@InternetMadeCoder Jeez, thank you for your time:) such long and awesome answers, appreciate it a lot.
      Oh wow, you are learning so fast tbh:) Kudos to you for that!
      2:) yeah, you are somewhat right I guess. but the sheer scale of automation is mindboggling:) I fully understand it when OPEN ai defeated OG (Dota 2 2x world champions), like the most "human" game with so many variables and a huge amount of teamwork. Was really the day when I realized how good it actually is lol. If you did not see it, strongly recommend. Especially since 2 of the team members were Finns:)
      3:) quite impressive once again.
      4) knew it! ahah) no one can do that good starting from zero. I kinda suggest you do the same video as this girl ruclips.net/video/5T3GY8PSiSI/видео.html&ab_channel=RuriOhama , because with we only see "tip of an iceberg", really good 2 know your beginnings.
      Ye I will, really wanna connect marketing with coding somehow:)

  • @novicazivkovic
    @novicazivkovic 2 года назад +1

    Looks like its time for the Downloads folder to be included as: Downloaded Pictures, Downloaded Music, Downloaded Movies, Downloaded Books, Downloaded N, based on user preferences in every OS on this planet.

  • @AB-fj5wi
    @AB-fj5wi 2 года назад +1

    I dont get how the observer's schedule function knows to call that specific on_modified function of the MoverHandler
    What if the MoverHandler had multiple methods?

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад

      I believe that’s just how the Observer api is built under the hood.

  • @GRAYgauss
    @GRAYgauss 2 года назад +1

    Good ol' bash scripts or pipes to compose unix utilities with pipes to solve a problem will be orders of magnitudes faster and more convenient. If you're going to be learning about a mass python libraries anyways, I wouldn't see a reason to not learn the unix suite. Unless you're going to move your dense automation logic to the C library side, there's no way you'd match performance. Considering how fast you can compose a command on the line too, the performance isn't for losing expressiveness. Python is great and going to be my own preferential choise, but it's kinda crippled for automation. Again, consider the mass of framework just to get started compared to the ready built for end use and decades optimized unix suite. A lone developer can never usurp millions of manhours of development while using an absolutely slower method to attempt it. Just use the backs of giants as footholds. Honestly, even using AHK is better for the job, if you're going for macro stuff and happen to be on Windows...I've also had some pretty bad experience with keyboard/mouse hooking in python...Slow polling, etc, but it has been solvable, just not something I would want to subject a beginner to anyways. Just give them something that is meant for the task.
    IDK, just look at re and compare the workflow of sed/awk/grep with implementing the same commands with re and pathlib, it's awkward at best and for a loss of performance. Obviously re makes sense in contexts, but if you're just trying to sort through your filesystem with iterdir() and process some files, create some diffs...oof.

  • @sarinasalim2494
    @sarinasalim2494 2 года назад +1

    Ok your Moomin mug has elevated you to super cool status to me. 😊

  • @westbccoast
    @westbccoast Месяц назад

    Awesome videos and ideas thank you, these are great motivators. Is there a reason why you don't add a python shebang at the type of your python files instead of using a shell script to call it ? Just curious. At the top you could add #!/usr/bin/python3 and that way you could just run ./fileAutomation.py. I must also assume there is a way to cd inside python. I am a beginner so just asking simple questions. Also I write shell scripts, so the shebang comes naturally for me.

  • @darrenchan1083
    @darrenchan1083 Год назад +1

    hmm can't seem to get it working with the new updated code from your github. Anyone here facing the same problem? Could just be me. Ps: I have no coding experience. This is my first project. So I could very well be doing something wrong!

  • @jessieonfly
    @jessieonfly 2 года назад +1

    I think it is better if you have a array list of each file type.

  • @ngabngab4891
    @ngabngab4891 2 года назад +3

    Exactly, for me coding is like a super power 😂..cryptic to many that it seems like odd enchantment ...

  • @juks23
    @juks23 2 года назад +1

    anybody else immediately think of epidemic sound as soon as the video started

  • @techtamizhi
    @techtamizhi Год назад

    I'm a beginner.
    1.Can you say how many hours take to complete this program?
    2.if I want to write a program, How to prepare my thought process like what are the functions that need to this program and how can I select a library?

  • @jwoneill1512
    @jwoneill1512 9 месяцев назад

    Like the video. What editor or ide are you using?

  • @ayecaptainjack6930
    @ayecaptainjack6930 2 года назад +1

    I think this task would actually be easier to write in bash as you can use commands without some kind of wrapper .

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад

      Yeah probably, I’m just more familiar with Python

    • @Yutaro-Yoshii
      @Yutaro-Yoshii 2 года назад +1

      I agree, with bash you can just mv *.mp4 ./my_vids
      But I really like the way he demonstrated the thinking process, like how to google, and how to divide a problem into manageable chunks. With those things in mind, you can basically make anything!

  • @gustavofelicidade_
    @gustavofelicidade_ 2 года назад

    Such great content I've discovered here! thanks in advance!

  • @whoami-ty1kp
    @whoami-ty1kp 2 года назад

    Hi, I'm so inspired from you. I'm also learning coding by myself from internet. I wanted to ask that in how many languages you can code?

  • @MEATHEADBooYA
    @MEATHEADBooYA 2 года назад

    I was wondering can you make a python web application or just GUI that speaks with windows functions?
    Such as what you are exactly doing here, listening to windows and then moving a file.

  • @kysivaram
    @kysivaram Год назад

    Same stuff can be done using automator which is available in mac

  • @HoracioSantisteban
    @HoracioSantisteban Год назад

    Great video, thanks for puting this together!
    One question, did I miss the make unique function? if anyone caught it, would you kindly let me know
    Thanks, in advance,

  • @johnnydepp4114
    @johnnydepp4114 2 года назад

    I love the way you are being hournest about your google search... i do the same and learn alot of it :D :D

  • @edzoft7546
    @edzoft7546 2 года назад

    If anyone is running into a codec error on, try a raw string for source_dir. Do this by putting an r in front of your string as below.
    source_dir = r"C:\Users\username\Downloads"

  • @seimela
    @seimela Год назад

    I want to use Python to updates the title blocks of electrical drawings.

  • @lindsayryder6919
    @lindsayryder6919 2 года назад

    Can someone explain more what he meant by setting the moverhandler() to an instance I created myself? Do I absolutely need to modify it for it to work for me? I’ve kept all the other variable names the same and set them to my specific paths.

  • @AlalUddin24
    @AlalUddin24 5 месяцев назад

    What if, I stop the terminal then these code will run in the background . Because if we think from user perspective then they will only download our file and that should work in the background ?

  • @anilrathore.bigthink
    @anilrathore.bigthink Год назад

    Thank you, Well Explained !

  • @Kaizala1933
    @Kaizala1933 2 года назад +1

    So what happens when a file is being downloaded and that watch dog library detects it and moves it while the download isn't over yet?

  • @Axel-st4up
    @Axel-st4up 2 года назад +1

    Bro bit his finger to transform into a Titan.

  • @saysnilaz8486
    @saysnilaz8486 8 месяцев назад

    how can I use the python program in windows command prompt with little step by step instructions

  • @cetrick_yeanay
    @cetrick_yeanay Год назад

    Thank you! Everyone in comments such brilliant minds! 🙏🏾

  • @travisthomas4886
    @travisthomas4886 2 года назад +1

    I want to take cs50 and eventually expand to other programming courses like the programming with c++ and game development. How long do you recommend waiting before enrolling in another course after completion of cs50 intro to computer science?

    • @InternetMadeCoder
      @InternetMadeCoder  2 года назад +2

      Why would you need to wait?

    • @travisthomas4886
      @travisthomas4886 2 года назад

      @@InternetMadeCoder do you ever feel overwhelmed by the work or a need to take a quick break in order to process the material better?

  • @cbbcbb6803
    @cbbcbb6803 Год назад

    Is Python the only thing that can execute Python libraries? Can Excel VBA or LibreOffice Calc execute Python libraries? If not, why not?

  • @declaretheglory7133
    @declaretheglory7133 2 года назад

    some very skilled individuals out there

  • @erwinputhoormanoj2965
    @erwinputhoormanoj2965 2 года назад

    There's a way you can schedule to run tasks at strat up.

  • @abdourahmanyoussouf7879
    @abdourahmanyoussouf7879 Год назад

    You are Awesome! Thank you

  • @parbonsenga9296
    @parbonsenga9296 Год назад

    how much experience and understanding should you have to accomplish this project ?

  • @mark_pribylnov
    @mark_pribylnov 2 года назад

    The location of your channel and this video is Finland.
    How have you learned English to such incredible level? 😮
    How long did it take?

  • @sunidhigarg673
    @sunidhigarg673 2 года назад

    hey, i am noob in this but you are helping me in learning, thankyou!

  • @rsxhitman
    @rsxhitman 2 года назад

    You can easily do this with autoit..although not sure if it’ll run on OS X