-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewVirtualEnv.bat
68 lines (66 loc) · 2.8 KB
/
NewVirtualEnv.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@ECHO off
setlocal EnableExtensions EnableDelayedExpansion
for %%i in ("%~dp0.") do set "parent=%%~fi"
cd ve
SET /P "newname=New Workspace: "
IF NOT "!newname!" == "" (
SET newvenv=%parent%\%newname%
ECHO Workspace : !newvenv!
cd..
robocopy ve !newname! /s >nul
cd %newname%
SET newws=!newname!.code-workspace
ren ws !newws!
::dir
set /P "UserChoice=Proceed with python Venv? [y/n]: "
IF "!UserChoice!" == "y" (
echo Creating new python Venv in %newname%...
python -m venv .env
code !newws! main.py
)
IF "!UserChoice!" == "n" (
set /P "removeIt=Remove '%newname%' folder? [y/n]: "
IF "!removeIt!" == "y" (
cd..
rmdir %newname% /s /q
)
IF "!removeIt!" == "n" (
cmd /k
)
)
)
IF "!newname!" == "" (
ECHO ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^!
sleep 80
ECHO.
ECHO ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^!
sleep 70
ECHO.
ECHO ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^^! ^^!^^!ABORT^^!^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