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

Python: copie an entire directory tree

Python: copie an entire directory tree

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 put underline in a textfile in java gui
  • python os.mkdir copy directory tree
  • java swing decLARE Variables
  • how to add seconds to current time using java

No comments yet.

Leave a Comment