WORKING STATE - PLAYTESTING
This commit is contained in:
parent
c8346ded11
commit
e4c09b4b51
32 changed files with 95 additions and 28 deletions
30
copyFiles.py
Normal file
30
copyFiles.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
def copy_files_to_root(src_folder, dest_root):
|
||||
# Check if source folder exists
|
||||
if not os.path.exists(src_folder):
|
||||
print(f"Source folder '{src_folder}' does not exist.")
|
||||
return
|
||||
|
||||
# Create destination root folder if it does not exist
|
||||
if not os.path.exists(dest_root):
|
||||
os.makedirs(dest_root)
|
||||
|
||||
# Copy files
|
||||
for item in os.listdir(src_folder):
|
||||
src_path = os.path.join(src_folder, item)
|
||||
dest_path = os.path.join(dest_root, item)
|
||||
|
||||
if os.path.isfile(src_path):
|
||||
shutil.copy2(src_path, dest_path)
|
||||
print(f"Copied '{src_path}' to '{dest_path}'")
|
||||
else:
|
||||
print(f"Skipped '{src_path}' as it is not a file")
|
||||
|
||||
# Define source folder and destination root
|
||||
src_folder = 'C:/Users/Marcel/CLionProjects/BuenzliIO/assets'
|
||||
dest_root = 'D:/'
|
||||
|
||||
# Execute the copy function
|
||||
copy_files_to_root(src_folder, dest_root)
|
Loading…
Add table
Add a link
Reference in a new issue