Last active
July 4, 2016 06:15
-
-
Save BichengLUO/35d570c17740b0e2cf408498a0c6a43c to your computer and use it in GitHub Desktop.
A Python script to copy Unity build output to UWP project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
import time | |
target_dir = 'C:\Users\\t-biluo\Documents\\visual studio 2015\Projects\Skype3D\Skype3D\Data' | |
source_dir = 'C:\Users\\t-biluo\Documents\Skype3D\Build\Skype3D\Data' | |
if __name__ == '__main__': | |
src_files = os.listdir(source_dir) | |
for file_name in src_files: | |
print 'Copying ' + file_name, | |
full_file_name = os.path.join(source_dir, file_name) | |
if (os.path.isfile(full_file_name)): | |
shutil.copy(full_file_name, target_dir) | |
else: | |
target_full_name = os.path.join(target_dir, file_name) | |
shutil.rmtree(target_full_name) | |
shutil.copytree(full_file_name, target_full_name) | |
print 'Done' | |
time.sleep(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment