Practical Recipes for Working With Files in Python

Liam Pulsifer

Liam Pulsifer 13 Lessons 1h 13m
basics python

Python has several built-in modules and functions for handling files. These functions are spread out over several modules such as os, os.path, shutil, and pathlib, to name a few. This course gathers in one place many of the functions you need to know in order to perform the most common operations on files in Python.

In this course, you’ll learn how to:

  • Retrieve file properties
  • Create directories
  • Match patterns in filenames
  • Traverse directory trees
  • Make temporary files and directories
  • Delete files and directories
  • Copy, move, or rename files and directories
  • Create and extract ZIP archives

About Liam Pulsifer

Liam Pulsifer Liam Pulsifer

Liam is a software engineer and avid Pythonista. When he's not writing code to automate all of his daily tasks, you can often find him running, playing basketball and tennis, reading, or eating good food.

» More about Liam

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

agerbes on Aug. 9, 2020

Awesome Tutorial. Good Job!

Hilman on Aug. 9, 2020

Beautiful, easy-to-understand series. Thank you.

Robb Glietz on Aug. 4, 2020

Great video learned a ton about how files work in Python. Thank you.

« Browse All Courses