How to set the current working directory? [duplicate] September 9, 2022 by Tarik Try os.chdir os.chdir(path) Change the current working directory to path. Availability: Unix, Windows.