In Python Basics: File System Operations, you learned how to use Python to work with files and folders. As a programmer, you’ll use the pathlib
and shutil
modules to complete file system operations. These include creating, iterating over, searching for, moving, and deleting files and folders.
While you already got lots of hands-on practice with file system operations, programmers never stop practicing! The more you use your new skills, the more comfortable you’ll be when it’s time to put them to work in your own coding. That’s why it’s a great idea to complete exercises to reinforce and test your knowledge of the file system.
In this video course, you’ve practiced:
- Creating a directory
- Iterating over the contents of a directory
- Searching for files using wildcards
- Moving and deleting files and folders
To learn more about file system operations in Python, check out Real Python’s tutorial and video course on pathlib
.
If you found this course useful, then check out the other Python Basics courses and the Python Basics: A Practical Introduction to Python 3 book.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
Hans Geukens on Jan. 23, 2023
Thanks for the training video. Are you sure that the doc string correctly covers the script content? I believe it generates the images-folder anyway, even if it already existed before, right?