1
일부 파일 목록이있는 프로그램이 있습니다. 목록에서 지정된 디렉토리로 디렉토리와 서브 디렉토리 만 복사해야하며 파일을 복사 할 필요가 없습니다. 나는 이것을 시도했지만 효과가 없다.Python, 디렉토리 만 복사
def copiarDirs():
items = list.curselection()
desti = tkFileDialog.askdirectory()
for dirs in os.walk(items, topdown=False):
for name in dirs:
#for i in items :
aux=root+"/"+list.get(i)
tryhard=("cp "+str(aux)+" "+str(desti))
os.system(tryhard)
미안하지만이 작동하지 않습니다. addittion에서 나는 curselection 디렉토리 만 복사하면된다. – mileswiles