Python Tutorial: Automate Parsing and Renaming of Multiple Files



In this video we will be writing a quick script to automate the parsing and renaming of multiple files. Writing quick scripts to automate boring and repetitive tasks is a great way to learn Python and it is a great way to save time. Let’s get started.

The code from this video can be found at:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –

#Python

Nguồn: https://benjaminjcohen.com/

Xem thêm bài viết khác: https://benjaminjcohen.com/cong-nghe/

38 Comments

  1. Really great tutorial! I'm just curious what would happen if some files didn't fit into that exact structure and maybe messed up the order by not putting the number at the end. Can we somehow check that e.g. the zfill-function really gets a number?

  2. This is amazing as hell! thanks Corey. I started to learn python 1 month ago i a owe you a lot of my progress! i will never forget you if i get a job in the near future as a data analyst , so i will donate to your patreon account in return of your useful videos.

  3. How do I go about it splitting names of different lengths? I get an error about too many values to unpack, or not enough!

  4. Man with this approach and the link to the code so easy to understand the process !!!

  5. "If I had hundreds of videos" …me watching your 142 video playlist! 🙂 Thank you btw! 🙂

  6. my school computer's directory path is in swedish and it gets error, any one know how to deal with that?

  7. Mind blown sir … awesome 😀

  8. I'm so surprised the only normal video that actually teaches you to how to do it, and not only copy-paste is from 2015
    and has such a low amount of likes and views. WHY?

    Thank you so much, I'm glad I found you.
    Probably saved me a day of reading just to understand what I understood from this video in 15 minutes <3

  9. Thanks Corey! I renamed 90 videos in my phone just by writing a code in my Pydriod3 app. 😁

  10. Combination of regular tutorials and examples like this could be super useful. PLEASE CONTINUE IT

  11. Thank you! I am new to Python and I like your videos showing the approach and achieving final results👍. How did you edit multiple variables at 7:56 ?

  12. @Corey would like you to make a python video to automate outlook mails that gets the Subject, From, To, body and attachment from the email

  13. Whoa, I used to do similar stuff, but did not know about zfill() Such a wonderful thing it is. Way more readable, laconic encapsulation than the mere condition I used.

  14. Would be nice to see a tutorial about parsing and renaming multiple folders and files recursively.

  15. These videos are my go-to for learning python. Clear explanations in manageable chunks. Thanks Corey.

  16. Nobody can explain things the way you do. Great work. Thank you Sir.

  17. Is this magic? It feels like magic

  18. You're the best, man!!
    I had just started looking for Python Automation and came across one of the best tutorials in the first place.

    Great, calm way of explaining things, crystal clear.

    Thanks a lot, keep creating such content.

  19. I've done this in Bash shell, but Python is easier.

  20. How did you write at three lines at the same time?

  21. That's an awesome use case Corey.
    Can you assist in the below use case.
    Requirement: Find the 'table name' from list of .sql files.
    If there is an impact then print the filename.

  22. i'm just starting to learn python, and I already have a use for this exact application. Thank you so much!

  23. Was a nice presentation….I loved it..

  24. Love your videos. This was awesome!

  25. Sir
    I have excel sheet which is continuously updating its data.
    I want that data in python for analysis.
    I tried but it give data only when sheet is saved but i cant do that per second. So how to get that data?

  26. 👍😊😀☺️😊👍👍

  27. for f in range 100000000:
    print ('Thank you very much')

  28. What if you wanted to do this recursively to all subfolders/files in a directory?

  29. thanks a lot you explained very well.

Leave a Reply

Your email address will not be published. Required fields are marked *