Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python for File Systems Navigation Review: Paths

Rickard Höijer
Rickard Höijer
1,145 Points

I can't figure out how to get get to the directory above the one I'm currently in with os.path.join(os.getcwd() Help!

About to give up.

1 Answer

Greg Kaleka
Greg Kaleka
39,021 Points

Hi Rickard,

Kenneth glosses over it a bit, but if you go back to the previous video, you'll see how to do this at 1:18. If you've used a bash terminal, you've probably used ../ to get to the parent directory. In os.path.join, you simply use .. to refer to the parent directory.

Keep coding!

Cheers :beers:

-Greg