Guest User

1230984756

a guest
Jul 5th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.42 KB | None | 0 0
  1. :password
  2. @echo off
  3. title
  4. cls
  5. echo.
  6. set /p username= Username:
  7. if %username% equ OS-2 goto password01
  8. goto password
  9. :password01
  10. set /p password= Password:
  11. if %password% equ password goto start
  12. goto password
  13. :start
  14. @echo off
  15. color 0F
  16. cls
  17. title OS-2 text-based DOS shell v.2.1
  18. echo -----------------------------------
  19. echo : OS-2 v.2.1 for Windows PC :
  20. echo : Type 'help' for more info :
  21. echo -----------------------------------
  22. rem user input below
  23. :os
  24. echo.
  25. set /p os= OS-2)
  26. if %os% equ clearscreen goto cls
  27. if %os% equ help goto help
  28. if %os% equ version goto ver
  29. if %os% equ view goto view
  30. if %os% equ change goto cd
  31. if %os% equ time goto timedisplay
  32. if %os% equ restart goto start
  33. if %os% equ cmd goto cmd
  34. if %os% equ open goto open
  35. if %os% equ programs goto programlist
  36. if %os% equ logout goto password
  37. if %os% equ NumberRandomizer goto numrand
  38. if %os% equ Calculator goto calc
  39. if %os% equ TextEdit goto textedit
  40. if %os% equ no goto yes
  41. if %os% equ changelog goto changelog
  42. if %os% equ exit goto exit
  43. if %os% equ newfolder goto md
  44. if %os% equ delete goto del
  45. if %os% equ move goto move
  46. rem help commands
  47. if %os% equ helpview goto help01
  48. if %os% equ helpchange goto help02
  49. goto error
  50. :error
  51. goto os
  52. :del
  53. echo.
  54. echo Delete what?
  55. echo (type 'goback' to cancel deletion.)
  56. set /p delete=
  57. if %delete% equ goback goto os
  58. goto del01
  59. :del01
  60. del %delete%
  61. goto os
  62. :move
  63. echo.
  64. echo Move what? (include file extension)
  65. set /p what= OS-2)
  66. goto move01
  67. :move01
  68. echo.
  69. echo To?
  70. set /p to= OS-2)
  71. goto move02
  72. :move02
  73. move /-y "%what%" "%to%"
  74. goto os
  75. :md
  76. echo.
  77. echo Are you sure you want to create a new folder? (Y/N)
  78. echo.
  79. set /p choice= OS-2)
  80. if %choice% equ y goto md01
  81. if %choice% equ Y goto md01
  82. goto os
  83. :md01
  84. echo.
  85. echo Folder name:
  86. set /p name= OS-2)
  87. goto md02
  88. :md02
  89. md %name%
  90. goto os
  91. :yes
  92. echo.
  93. echo Yes.
  94. goto os
  95. :exit
  96. exit
  97. :calc
  98. echo.
  99. echo OS-2 Calculator
  100. echo.
  101. ECHO * - Multiplication
  102. ECHO + - Addition
  103. ECHO _ - Subtraction
  104. ECHO / - Division
  105. echo.
  106. set /p UDefine=
  107. set /a UDefine=%UDefine%
  108. echo.
  109. echo %UDefine%
  110. echo.
  111. goto os
  112. :numrand
  113. echo.
  114. echo Your random number is %random%
  115. echo You can use this as a password, or for board games!
  116. goto os
  117. :textedit
  118. echo.
  119. echo TextEdit OS-2
  120. echo 1. Create new (text) file
  121. echo 2. View the contents of a (text) file.
  122. echo 3. Exit to OS-2 Shell
  123. echo.
  124. set /p choice= TextEdit)
  125. if %choice% equ 1 goto new
  126. if %choice% equ 2 goto open01
  127. if %choice% equ 3 goto os
  128. goto os
  129. :new
  130. echo.
  131. echo Enter the name of your new file;
  132. echo.
  133. set /p name=
  134. goto new01
  135. :new01
  136. cls
  137. echo.
  138. echo Enter the contents of your file;
  139. echo.
  140. set /p content=
  141. goto save
  142. :save
  143. echo %content%>>%name%.txt
  144. goto os
  145. :open01
  146. echo.
  147. echo Type the name of the (text) file you are trying to open.
  148. set /p file=
  149. echo.
  150. FOR /F "tokens=*" %%i IN (%file%.txt) DO @ECHO %%i
  151. goto os
  152. :changelog
  153. echo.
  154. echo Version 1.0:
  155. echo OS-2 base configuration.
  156. echo 'view' list is too long.
  157. echo.
  158. echo Version 1.5:
  159. echo Added Simple_OS programs to OS-2 to help round out program selection.
  160. echo Added username and password screen on startup.
  161. echo Added 'OS-2)' plate to all shell commands.
  162. echo.
  163. echo Version 2.0:
  164. echo Added deletion functions.
  165. echo.
  166. echo Version 2.1:
  167. echo Added ability to move files.
  168. echo Added ability to open text files inside OS-2, opposed to Notepad.
  169. echo.
  170. echo Version 2.1.1:
  171. echo Changed all refrences to words 'operating system' to 'DOS shell.'
  172. goto os
  173. :timedisplay
  174. echo.
  175. echo %time%
  176. goto os
  177. :programlist
  178. echo.
  179. echo (to open programs, just type the name into the shell)
  180. echo - Utility
  181. echo [NumberRandomizer]
  182. echo [Calculator]
  183. echo [TextEdit]
  184. echo [changelog]
  185. goto os
  186. :cd
  187. echo.
  188. echo Enter the folder name
  189. echo (or type '..' to go up)
  190. set /p dir=
  191. goto cd01
  192. :cd01
  193. cd %dir%
  194. :view
  195. dir/w
  196. goto os
  197. :ver
  198. echo.
  199. echo OS-2 text-based DOS shell v.1.5
  200. echo Utilizes code from Simple_OS_1.1.5
  201. echo CMD (c) 2018 Microsoft Corporation.
  202. echo By Robert J. Epps IV
  203. goto os
  204. rem help message below
  205. :open
  206. echo.
  207. echo Open what?
  208. set /p open=
  209. if %open% equ back goto os
  210. if %open% equ tetris goto tetris
  211. goto open1
  212. :open1
  213. start %open%
  214. goto os
  215. :cls
  216. cls
  217. goto os
  218. :help
  219. echo.
  220. echo Common commands in using OS-2;
  221. echo help - Open the help menu
  222. echo view - View your current directory
  223. echo change (directory) - Change your current directory.
  224. echo clearscreen - Clears the screen.
  225. echo exit - Exit the program.
  226. echo programs - Displays the program list.
  227. echo version - Displays the software version.
  228. echo delete - Deletes any selected file.
  229. echo newfolder - Creates a new folder.
  230. echo logout - Returns to login screen
  231. echo move - Move a selected file to another location.
  232. echo You can type one of these commands after 'help' for more info. (e.g; helpview)
  233. goto os
  234. :help01
  235. rem view help
  236. echo.
  237. echo View commands;
  238. echo View allows you to view the directory you are currently in, and the contents of it.
  239. echo You can see folders, individual files, and shortcuts. Use the 'change' command to
  240. echo change your directory to another, even going up a level!
  241. echo.
  242. goto os
  243. :help02
  244. rem change help
  245. echo.
  246. echo Change commands;
  247. echo Change allows for the changing of directories. (e.g; I went from C:\Windows\Desktop to C:\Windows\Desktop\OS-2 !)
  248. goto os
  249. :cmd
  250. title Command Prompt
  251. echo.
  252. echo Advanced mode enabled.
  253. echo Entering Command Prompt.
  254. cmd
  255.  
  256. rem Built-in games
  257.  
  258. rem
Add Comment
Please, Sign In to add comment