3

Possible Duplicate:
How to set the current working directory in Python?

How to change C:\> to F:\> using Python

I tried

import os
os.chdir("F:")

but got an error.

Community
  • 1
  • 1
user1540228
  • 67
  • 1
  • 4

1 Answers1

2

You need the extra backslash:

import os  
os.chdir("F:\\")
Karoly Horvath
  • 91,854
  • 11
  • 113
  • 173