-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGSGD_setup.bat
26 lines (22 loc) · 944 Bytes
/
GSGD_setup.bat
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
@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
setlocal enabledelayedexpansion
echo "Select Source Folder"
set "psCommand="(new-object -COM 'Shell.Application')^
.BrowseForFolder(0,'Please select the Source Folder.',0,0).self.path""
for /f "usebackq delims=" %%I in (`powershell %psCommand%`) do set "srcfolder=%%I"
set "srcCode=\code"
set "srcCodeFolder=%srcfolder%%srcCode%"
echo "Select Destination Folder"
set "psCommand="(new-object -COM 'Shell.Application')^
.BrowseForFolder(0,'Please Select the Destination MATLAB folder.',0,0).self.path""
for /f "usebackq delims=" %%I in (`powershell %psCommand%`) do set "folder=%%I"
set "gsgdcnn=\cnn"
set "cnn_orignal=\cnn_orignal"
set "folderDuplication=%folder%%gsgdcnn%"
set "avoidfolderDuplication=%folder%%cnn_orignal%"
IF EXIST !folderDuplication! (
rename "%folderDuplication%" "cnn_original"
)
xcopy "%srcCodeFolder%" "%folder%" /s /i
endlocal