copyFile.py 593 B

1234567891011121314151617181920212223
  1. import os
  2. import shutil
  3. def copy_folder(source_folder, destination_folder):
  4. if not os.path.exists(destination_folder):
  5. os.makedirs(destination_folder)
  6. for item in os.listdir(source_folder):
  7. source = os.path.join(source_folder, item)
  8. destination = os.path.join(destination_folder, item)
  9. if os.path.isdir(source):
  10. copy_folder(source, destination)
  11. else:
  12. shutil.copy(source, destination)
  13. os.makedirs("./res/json")
  14. os.makedirs("./res/jar")
  15. copy_folder("json", "res/json")
  16. copy_folder("jar", "res/jar")