useful modules print(os path join'directory ''file txt ')(' :/users/heinold/desktop''file txt'file txt :/users/heinold/desktop directory\\file txt note that the standard separator in windows is the backslash the forward slash also works finallytwo other functions you might find helpful are the exists functionwhich tests if file or directory existsand getsizewhich gets the size of file there are many other functions in os path see the python documentation [ for more information os walk the os walk function allows you to scan through directory and all of its subdirectories here is simple example that finds all the python files on my desktop or in subdirectories of my desktopfor (pathdirsfilesin os walk' :/users/heinold/desktop')for filename in filesif filename[- :]=py 'print(filename running and quitting programs running programs there are few different ways for your program to run another program one of them uses the system function in the os module here is an exampleimport os os chdir' :/users/heinold/desktop 'os system'file exe 'the system function can be used to run commands that you can run at command prompt another way to run your programs is to use the execv function quitting your program the sys module has function called exit that can be used to quit your program here is simple exampleimport sys ans input'quit the program'if ans lower(='yes sys exit( zip files zip file is compressed file or directory of files the following code extracts all the files from zip filefilename zipto my desktop