-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoad from Github.py
27 lines (22 loc) · 1.04 KB
/
Load from Github.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os,shutil
baseDir = os.getcwd()
Arduino_folder = "C:/Users/aj200/Documents/Arduino"
ESP8266_libraries_folder = "C:/Users/aj200/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/libraries"
Python_Projects_Folder = "C:/Users/aj200/AppData/Local/Programs/Python/Python38/My Python Scripts"
Github_Arduino_Folder = baseDir + "/Arduino Folder"
Github_ESP8266_Libraries_Folder = baseDir + "/ESP8266 Libraries"
Github_Python_Projects_Folder = baseDir + "/Python Projects"
def DeleteFolder(directory):
if (os.path.exists(directory)):
print("Deleting: " + directory)
shutil.rmtree(directory)
DeleteFolder(Arduino_folder)
DeleteFolder(ESP8266_libraries_folder)
DeleteFolder(Python_Projects_Folder)
print("Copying Arduino Projects Folder")
shutil.copytree(Github_Arduino_Folder,Arduino_folder)
print("Copying ESP8266 Libraries Folder")
#shutil.copytree(Github_ESP8266_Libraries_Folder,ESP8266_libraries_folder)
print("Copying Python Projects Folder")
shutil.copytree(Github_Python_Projects_Folder,Python_Projects_Folder)
print("Done!")