How to work with files and directories

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Atran
    Contributor
    • May 2007
    • 319

    How to work with files and directories

    Hello, I want open file or delete file or create directory...... .... using python.
    Thanks.
  • ilikepython
    Recognized Expert Contributor
    • Feb 2007
    • 844

    #2
    Originally posted by Atran
    Hello, I want open file or delete file or create directory...... .... using python.
    Thanks.
    You can open a file by doing this:
    [code=python]
    myfile = open("C:\\myfil e.txt")
    [/code]
    For other stuff having to do with files and directories try the os module .

    Comment

    Working...