Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: copie an entire directory tree

Python: copie an entire directory tree
{filelink=16051}

import shutil
import os
# move all text files from current directory to Backup directory
for file in os.listdir("."):
    if os.path.splitext(file)[1] == ".txt":
        print file
        shutil.copy(file, os.path.join("backup", file))

Users who found this page were searching for:

  • how to add seconds to current time using java
  • java swing decLARE Variables
  • how to put underline in a textfile in java gui
  • python os.mkdir copy directory tree

No comments yet.

Leave a Comment