Copy files

Discussion in 'Python' started by ChengGong, Mar 31, 2006.

  1. ChengGong

    ChengGong Guest

    How can I copy a file from one folder to another(subfolder) without
    change and property. I work on zope.
     
    ChengGong, Mar 31, 2006
    #1
    1. Advertisements

  2. ChengGong

    v0id Guest

    I haven't tested this, but i maybe think it works?

    import shutil
    try:
    copy("your_file.txt", "your_subfolder")
    print "Done!"
    except:
    print "Failed!"
     
    v0id, Mar 31, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Blair
    Replies:
    4
    Views:
    1,262
    John Saunders
    Jan 12, 2005
  2. Steve Richter
    Replies:
    4
    Views:
    5,879
    Steve Richter
    Apr 18, 2005
  3. Steve Franks

    Copy Web tool does not copy sub dirs?

    Steve Franks, Sep 14, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    598
    Steve Franks
    Sep 15, 2005
  4. VisionSet
    Replies:
    8
    Views:
    5,213
    Tris Orendorff
    Apr 29, 2004
  5. Replies:
    6
    Views:
    31,857
    Diplomat
    Jan 12, 2011
  6. Replies:
    30
    Views:
    1,376
  7. Alex
    Replies:
    2
    Views:
    1,610
  8. Replies:
    26
    Views:
    2,573
    Roland Pibinger
    Sep 1, 2006
Loading...