Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Python Basics: File System Operations (Summary)

Now you’re ready to use Python for file system operations! This is a huge step up. Working with files allows you to hold onto your data after a program terminates, load your data more quickly and conveniently, and move your data from one computer to another.

In this video course, you’ve learned how to:

  • Create files and directories
  • Iterate over the contents of a directory
  • Search for files and folders using wildcards
  • Move and delete files and folders

For more information on the topics in this course, check out:


Sample Code (.zip)

22.5 KB


Course Slides (.pdf)

6.0 MB

Ray Osborn on Dec. 20, 2022

Very clear course. I am a little confused about shutil compatibility with path-like objects in older Python versions. It looks as if path-like objects could only be used as shutil arguments in v3.8, but the Python documentation seems to imply that the move function was only updated in 3.9. I guess that doesn’t affect this course, because we would use the pathlib replace function, but unfortunately many shared Python distributions still run 3.7.

akazimierz on Jan. 5, 2023

Thanks for the course, Martin – I’m glad I learned new things.

Some time ago I wrote utility functions for IDLE, so I could move through directories as within the terminal – now perhaps I could refactor some code, or add new functions. IDLE ls() example

Martin Breuss RP Team on Jan. 5, 2023

@akazimierz that looks like a useful utility function. Do you have these somewhere on a GitHub repo and do you want to share them?

writetomdw on Jan. 25, 2023

nicely constructed course for beginners although it has references to generators and tuples so good to leave some supporting materials or links to read for absolute beginners to fit the title of this course. Overall it is a good course to clear the basic concepts of file system.

Become a Member to join the conversation.