-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSPDac_env_cfg.bat
More file actions
executable file
·35 lines (24 loc) · 953 Bytes
/
Copy pathSPDac_env_cfg.bat
File metadata and controls
executable file
·35 lines (24 loc) · 953 Bytes
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
28
29
30
31
32
33
34
35
@echo off
set "source_folder=%~dp0..\SPDev"
pip install qcodes qcodes_contrib_drivers pyvisa pyvisa-py pyusb pyudev pyserial zeroconf
REM Execute the "pip show qcodes_contrib_drivers" command and save the output to a temporary file
pip show qcodes_contrib_drivers > temp.txt
REM Extract the "location" field
for /f "tokens=2 delims=: " %%a in ('findstr /c:"Location:" temp.txt') do (
set "locationA=%%a"
)
for /f "tokens=3 delims=: " %%a in ('findstr /c:"Location:" temp.txt') do (
set "locationB=%%a"
)
REM Delete the temporary file
del temp.txt
set "destination_folder=%locationA%:%locationB%\qcodes_contrib_drivers\drivers\SPDev"
REM Display the extracted location
echo source_folder: %source_folder%
echo Location: %destination_folder%
if not exist "%destination_folder%" (
mkdir "%destination_folder%"
)
xcopy /s /i "%source_folder%" "%destination_folder%"
echo The SPDev folder has been copied to %destination_folder%
PAUSE