Back to Browse

Using Python to List the files in a Directory

1.4K views
Jun 13, 2024
9:25

This is a preview of the video course, "Listing All Files in a Directory With Python." Getting a list of all the files and folders in a directory is a natural first step for many file-related operations in Python. When looking into it, though, you may be surprised to find various ways to go about it. This is a portion of the complete course, which you can find here: https://realpython.com/courses/efficient-iterations-iterators-iterables/ The rest of the course covers: - Using .glob and .rglob() - Listing files using recursive techniques - Conditionally listing the files

Download

1 formats

Video Formats

360pmp412.3 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Using Python to List the files in a Directory | NatokHD