Skip to content

Commit

Permalink
feat: 复制文件的脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
Greatwallcorner committed Jul 7, 2024
1 parent c27acda commit 70e7be5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ bin/
/%SystemDrive%/
/.idea/
/TV/
res
22 changes: 22 additions & 0 deletions copyFile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os
import shutil


def copy_folder(source_folder, destination_folder):
if not os.path.exists(destination_folder):
os.makedirs(destination_folder)

for item in os.listdir(source_folder):
source = os.path.join(source_folder, item)
destination = os.path.join(destination_folder, item)

if os.path.isdir(source):
copy_folder(source, destination)
else:
shutil.copy2(source, destination)

os.makedirs("./res/json")
os.makedirs("./res/jar")
copy_folder("json", "res/json")
copy_folder("jar", "res/jar")

0 comments on commit 70e7be5

Please sign in to comment.