# Paths and Folders with pathlib

A Path from Python's pathlib module holds a file's or folder's address in parts, so a script can join paths with /, read a file's name and extension, list and find the files in a folder, and make folders, the same way on Windows and on a Mac.

![Cheat sheet: Paths and Folders with pathlib](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/b4f554eaab2d4bfabcd45c66579f025d.webp)

- Category: Python
- Level: Apprentice
- Tags: Absolute Path (operating-system), File Extension, glob, pathlib, python, Relative Path (operating-system)
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/python-automation-paths-with-pathlib-cheat-sheet
