Advertisement
hzpfywtd

Untitled

Jan 21st, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. import os
  2. import shutil
  3.  
  4. def copytree(src, dst, symlinks=False, ignore=None):
  5.     for item in os.listdir(src):
  6.         s = os.path.join(src, item)
  7.         d = os.path.join(dst, item)
  8.         if os.path.isdir(s):
  9.             shutil.copytree(s, d, symlinks, ignore)
  10.         else:
  11.             shutil.copy2(s, d)
  12.  
  13. folder = [_ for _ in os.listdir() if os.path.isdir(os.getcwd() + '\\' + _) and not _.startswith('.')].pop()
  14. drives = ["E","F","G","H","J"]
  15.  
  16. for drive in drives:
  17.     copytree(folder,drive)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement