test.py 610 B

1234567891011121314151617181920212223
  1. from utils.fileio import *
  2. import os
  3. import shutil
  4. CUR_PATH = os.path.dirname(__file__)
  5. # path1 = "data/purposeSplit.bk"
  6. # files1 = walk_files("data/purposeSplit.bk")
  7. # files2 = walk_files("data/purposeSplit3")
  8. # print(files1[:100])
  9. # print(files2[:100])
  10. # for file2 in files2:
  11. # file22 = file2.replace("purposeSplit3", "purposeSplit.bk")
  12. # if file22 in files1:
  13. # os.remove(file22)
  14. # shutil.move(file2, file22)
  15. file_list = "data/purposeSplit.bk"
  16. for directory in os.listdir(file_list):
  17. directory2 = file_list + "/" + directory
  18. print(directory, len(walk_files(directory2)))