代碼:
import os
import os,shutil
flist = os.listdir(r'F:\test\與debin實驗對比的數據集\arm')
print(flist)
for i in range(len(flist)):
l1 = os.listdir(r'F:\test\與debin實驗對比的數據集\arm\\' + flist[i])
for j in range(len(l1)):
print(flist[i] +'-'+ l1[j])
shutil.copyfile(os.path.join(r'F:\test\與debin實驗對比的數據集\arm\\' + flist[i],l1[j]),
os.path.join(r'F:\test\與debin實驗對比的數據集\new_arm\\',flist[i] +'-'+ l1[j]))