Python: Working with File Paths Using pathlib

Wishlist Share

About Course

Use Python’s pathlib module to build, inspect and search file paths in a way that works on Windows, macOS and Linux. You will join paths with the / operator, read and write files, create folders safely and find files with glob patterns.

Tutwoo is an independent learning provider. This course is general training based on the official Python documentation. It is not produced or endorsed by the Python Software Foundation and is not an accredited qualification.

© 2026 Tutwoo UK Limited. This course was created in-house by Tutwoo and is our original work. It is for your own learning only: please do not copy, share, record or resell it.

What Will You Learn?

  • Build file paths that work on every operating system
  • Pull out a file’s name, stem, extension and parent folder
  • Read, write and create files and folders safely
  • Find files with glob and rglob patterns

Course Content

Course Lessons

  • Path objects and joining paths
  • Taking paths apart and changing them
  • Reading, writing, creating and finding files

Sources & Further Reading
The official guidance this course is based on.

Final Assessment

Student Ratings & Reviews

No Review Yet
No Review Yet

Want to receive push notifications for all major on-site activities?

✕