Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Created on Sun Oct 24 13:57:30 2021
- @author: Sanjit
- """
- import os
- import glob
- import shutil
- i = 1
- for i in range(1,17):
- tFile = 'tut'+'%02d'%i
- if(not os.path.exists(tFile)):
- os.mkdir(tFile)
- for file in glob.glob("cs384_2021_21-11_Sanjit_t6/*"):
- # print(file)
- # if(not os.path.exists(tFile+'\\'+file.split('\\')[-1])):
- # os.mkdir(tFile+'\\'+file.split('\\')[-1])
- for innerFile in glob.glob(file+'/*'):
- # print(innerFile)
- if (innerFile.split('\\')[-1] == tFile):
- try:
- shutil.copytree(innerFile, tFile+'\\'+file.split('\\')[-1])
- except:
- pass
- print(tFile)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement