-
Notifications
You must be signed in to change notification settings - Fork 0
/
Batch Prompt.bat
166 lines (159 loc) · 4.48 KB
/
Batch Prompt.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!-- :
@SET "LOCATION=%CD%"
@ECHO OFF
@TITLE Think ^>^>^<^>^> Differently
@COLOR 27
@CLS
@ECHO: ___________
@ECHO: ^/ ^\
@ECHO: ^| THINK ^|
@ECHO: ^| ^> ^> ^< ^> ^> ^|
@ECHO: ^|DIFFERENTLY^|
@ECHO: ^\___________^/
@ECHO.
@ECHO.
@ECHO:Please report issues at the following URL:
@ECHO: https://github.com/HeyITGuyFixIt/Beta-Batch-Prompt/issues
@TIMEOUT /T 02>nul
@GOTO SETTINGS
:SETTINGS
@ECHO OFF
@REM Change the color of the console
@SET "COLORS=0A"
@REM Set to TRUE to have ECHO equal ON or set to FALSE to have ECHO equal OFF when started
@SET "ECHOTOGGLE=TRUE"
@REM Replace %USERPROFILE% with whatever location you would like to start with. %USERPROFILE% is equal to "C:\Users\<your username>"
@SET "CDDIR=%USERPROFILE%"
@GOTO START
:START
@ECHO OFF
@SETLOCAL EnableDelayedExpansion
@TITLE ^>^>^<^>^> Beta Batch Prompt
@CD %CDDIR%
@COLOR %COLORS%
@CLS
@ECHO:Beta Batch Prompt [Version 1.0.0.10]
@ECHO:Copyright (c) 2018 Christian Sirolli
@IF /I "%ECHOTOGGLE%"=="true" (GOTO CMDON)
@IF /I "%ECHOTOGGLE%"=="false" (GOTO CMDOFF)
:CMDOFF
@ECHO OFF
@CD %CDDIR%
@SET "ECHO=off"
@SET "CMD="
@SET /P CMD=""
@IF /I "%CMD%"=="" (GOTO CMDOFF)
@IF /I "%CMD%"=="@ECHO OFF" (SET "ECHOTOGGLE=false" && GOTO CMDOFF)
@IF /I "%CMD%"=="ECHO OFF" (SET "ECHOTOGGLE=false" && GOTO CMDOFF)
@IF /I "%CMD%"=="@ECHO ON" (SET "ECHOTOGGLE=true" && GOTO CMDON)
@IF /I "%CMD%"=="ECHO ON" (SET "ECHOTOGGLE=true" && GOTO CMDON)
@IF /I "%CMD%"=="exit" (GOTO EXIT)
@IF /I "%CMD%"=="echo" (ECHO:ECHO is %ECHO%. && GOTO CONTINUEOFF)
@IF /I "%CMD%"=="debug" (CD "%LOCATION%" && CALL "%LOCATION%/debug.bat" && EXIT)
@echo "%CMD%"|findstr /I /R /C:"\<ECHO\ ON\ " >nul 2>&1
@if not errorlevel 1 (
@SET "ECHOTOGGLE=true"
CALL %CMD%
ECHO OFF
GOTO CONTINUEON
) else (
@echo "%CMD%"|findstr /I /R /C:"\<ECHO\ OFF\ " >nul 2>&1
@if not errorlevel 1 (
@SET "ECHOTOGGLE=false"
CALL %CMD%
ECHO OFF
GOTO CONTINUEOFF
) else (
@echo "%CMD%"|findstr /I /R /C:"\ ECHO\ ON\>" >nul 2>&1
@if not errorlevel 1 (
@SET "ECHOTOGGLE=true"
CALL %CMD%
ECHO OFF
GOTO CONTINUEON
) else (
@echo "%CMD%"|findstr /I /R /C:"\ ECHO\ OFF\>" >nul 2>&1
@if not errorlevel 1 (
@SET "ECHOTOGGLE=false"
CALL %CMD%
ECHO OFF
GOTO CONTINUEOFF
) else (
@echo "%CMD%"|findstr /I /R /C:"/?" >nul 2>&1
@if not errorlevel 1 (
%CMD%
) else (
@echo "%CMD%"|findstr /I /R /C:"-?" >nul 2>&1
@if not errorlevel 1 (
%CMD%
) else (
CALL %CMD%
))))))
:CONTINUEOFF
@SET "CDDIR=%CD%"
@GOTO CMDOFF
:CMDON
@ECHO OFF
@CD %CDDIR%
@SET "ECHO=on"
@ECHO.
@SET "CMD="
@SET /P "CMD=%CDDIR%>"
@IF /I "%CMD%"=="" (GOTO CMDON)
@IF /I "%CMD%"=="@ECHO OFF" (SET "ECHOTOGGLE=false" && GOTO CMDOFF)
@IF /I "%CMD%"=="ECHO OFF" (SET "ECHOTOGGLE=false" && GOTO CMDOFF)
@IF /I "%CMD%"=="@ECHO ON" (SET "ECHOTOGGLE=true" && GOTO CMDON)
@IF /I "%CMD%"=="ECHO ON" (SET "ECHOTOGGLE=true" && GOTO CMDON)
@IF /I "%CMD%"=="exit" (GOTO EXIT)
@IF /I "%CMD%"=="echo" (ECHO:ECHO is %ECHO%. && GOTO CONTINUEON)
@IF /I "%CMD%"=="debug" (CD "%LOCATION%" && CALL "%LOCATION%/debug.bat" && EXIT)
@echo "%CMD%"|findstr /I /R /C:"\<ECHO\ ON\ " >nul 2>&1
@if not errorlevel 1 (
@SET "ECHOTOGGLE=true"
CALL %CMD%
ECHO OFF
GOTO CONTINUEON
) else (
@echo "%CMD%"|findstr /I /R /C:"\<ECHO\ OFF\ " >nul 2>&1
@if not errorlevel 1 (
@SET "ECHOTOGGLE=false"
CALL %CMD%
ECHO OFF
GOTO CONTINUEOFF
) else (
@echo "%CMD%"|findstr /I /R /C:"\ ECHO\ ON\>" >nul 2>&1
@if not errorlevel 1 (
@SET "ECHOTOGGLE=true"
CALL %CMD%
ECHO OFF
GOTO CONTINUEON
) else (
@echo "%CMD%"|findstr /I /R /C:"\ ECHO\ OFF\>" >nul 2>&1
@if not errorlevel 1 (
@SET "ECHOTOGGLE=false"
CALL %CMD%
ECHO OFF
GOTO CONTINUEOFF
) else (
@echo "%CMD%"|findstr /I /R /C:"/?" >nul 2>&1
@if not errorlevel 1 (
%CMD%
) else (
@echo "%CMD%"|findstr /I /R /C:"-?" >nul 2>&1
@if not errorlevel 1 (
%CMD%
) else (
CALL %CMD%
))))))
:CONTINUEON
@SET "CDDIR=%CD%"
@GOTO CMDON
:EXIT
@ENDLOCAL
@CD %LOCATION%
@ECHO OFF
@CSCRIPT //nologo "%~f0?.wsf" %*
@EXIT /B
-->
<job><script language="VBScript">
msgbox "Thanks for using Beta Batch Prompt.", vbInformation+VbMsgBoxSETForeground, "Exiting Beta Batch Prompt - Good Bye and God Bless!"
</script></job>