Automate with Python: Rename and Organize Your Files with Python - Python Sort Files

Published: 07 March 2021
on channel: datagy
14,724
312

In this video, you'll learn how to rename and organize your files easily with Python! It's a fun automating project that will help you learn scripting with Python and how to automate boring, repetitive tasks.

Download the files here: https://github.com/datagy/mediumdata/...

Read the written version of this tutorial here: https://towardsdatascience.com/automa...

----------------------------------------------------------

✅ Check out my eBook to get started with Python for Data Science: https://gumroad.com/l/introtopythonfo...

✅ Follow me on other platforms:
Website: https://datagy.io
Twitter:   / datagyio  
Mailing List: https://mailchi.mp/f6a58f2d73d0/datag... (and get a FREE Pandas tip and tricks book and a FREE Guide to SQL)

0:00 Introduction
1:01 Loading Libraries and Files
1:38 Creating a Pathlib Object
2:50 Exploring Pathlib attributes and methods
5:15 Looping over files in a directory
6:35 Setting up our renaming loop
8:44 Modifying the date format
11:00 Creating a new name with f-strings
12:40 Sorting files into new folders
15:05 Checking if folders exists with Pathlib
17:20 Renaming and Moving Files
18:00 Conclusion

Learn Python programming the right way!


On this page of the site you can watch the video online Automate with Python: Rename and Organize Your Files with Python - Python Sort Files with a duration of hours minute second in good quality, which was uploaded by the user datagy 07 March 2021, share the link with friends and acquaintances, this video has already been watched 14,724 times on youtube and it was liked by 312 viewers. Enjoy your viewing!