Imthedude025

Create BANNED Folder Names (Batch)

Apr 26th, 2020
19
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. ::Create Illigil Folder Names Via Batch ::
  3. ::Created by RU$$ [http://russdev.mooo.com/] ::
  4. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  5. @ECHO OFF
  6. @Set "Name="
  7.  
  8. :Menu
  9. cls
  10. call :Logo
  11. echo(
  12. echo ABOUT:
  13. echo This tool will allow you to create and remove banned folders within command line.
  14. echo(
  15. echo OPTIONS:
  16. echo 1. Create Folder.
  17. echo 2. Remove Folder.
  18. call :Logo2
  19. echo(
  20. set /p "FolderName=Select An Option: "
  21.  
  22. IF /I '%FolderName%'=='1' GOTO MakeFolder
  23. IF /I '%FolderName%'=='2' GOTO RemoveFolder
  24.  
  25. GOTO Menu
  26.  
  27. :MakeFolder
  28. cls
  29. call :Logo
  30. call :Logo2
  31. echo(
  32. echo EXAMPLE: C:\Program Files\Intel
  33. echo(
  34. set /p "location=Create Folder To Directory: "
  35. if not exist %location% (goto MakeFolder)
  36. goto CreateFolder
  37.  
  38. :CreateFolder
  39. cls
  40. call :Logo
  41. call :Logo2
  42. Echo(
  43. Echo Windows Banned Folder Names:
  44. Echo(
  45. Echo 01. CON 02. PRN 03. AUX 04. NUL
  46. Echo 05. COM1 06. COM2 07. COM3 08. COM4
  47. Echo 09. COM5 10. COM6 11. COM7 12. COM8
  48. Echo 13. COM9 14. LPT1 15. LPT2 16. LPT3
  49. Echo 17. LPT4 18. LPT5 19. LPT6 20. LPT7
  50. Echo 21. LPT8 22. LPT9
  51. call :Logo2
  52. Echo(
  53.  
  54. set /p "FolderName=Create Folder To Directory: "
  55.  
  56. IF /I '%FolderName%'=='1' (
  57. Set "Name=CON"
  58. goto MakeFolderNow
  59. )
  60. IF /I '%FolderName%'=='2' (
  61. Set "Name=PRN"
  62. goto MakeFolderNow
  63. )
  64. IF /I '%FolderName%'=='3' (
  65. Set "Name=AUX"
  66. goto MakeFolderNow
  67. )
  68. IF /I '%FolderName%'=='4' (
  69. Set "Name=NUL"
  70. goto MakeFolderNow
  71. )
  72. IF /I '%FolderName%'=='5' (
  73. Set "Name=COM1"
  74. goto MakeFolderNow
  75. )
  76. IF /I '%FolderName%'=='6' (
  77. Set "Name=COM2"
  78. goto MakeFolderNow
  79. )
  80. IF /I '%FolderName%'=='7' (
  81. Set "Name=COM3"
  82. goto MakeFolderNow
  83. )
  84. IF /I '%FolderName%'=='8' (
  85. Set "Name=COM4"
  86. goto MakeFolderNow
  87. )
  88. IF /I '%FolderName%'=='9' (
  89. Set "Name=COM5"
  90. goto MakeFolderNow
  91. )
  92. IF /I '%FolderName%'=='10' (
  93. Set "Name=COM6"
  94. goto MakeFolderNow
  95. )
  96. IF /I '%FolderName%'=='11' (
  97. Set "Name=COM7"
  98. goto MakeFolderNow
  99. )
  100. IF /I '%FolderName%'=='12' (
  101. Set "Name=COM8"
  102. goto MakeFolderNow
  103. )
  104. IF /I '%FolderName%'=='13' (
  105. Set "Name=COM9"
  106. goto MakeFolderNow
  107. )
  108. IF /I '%FolderName%'=='14' (
  109. Set "Name=LPT1"
  110. goto MakeFolderNow
  111. )
  112. IF /I '%FolderName%'=='15' (
  113. Set "Name=LPT2"
  114. goto MakeFolderNow
  115. )
  116. IF /I '%FolderName%'=='16' (
  117. Set "Name=LPT3"
  118. goto MakeFolderNow
  119. )
  120. IF /I '%FolderName%'=='17' (
  121. Set "Name=LPT4"
  122. goto MakeFolderNow
  123. )
  124. IF /I '%FolderName%'=='18' (
  125. Set "Name=LPT5"
  126. goto MakeFolderNow
  127. )
  128. IF /I '%FolderName%'=='19' (
  129. Set "Name=LPT6"
  130. goto MakeFolderNow
  131. )
  132. IF /I '%FolderName%'=='20' (
  133. Set "Name=LPT7"
  134. goto MakeFolderNow
  135. )
  136. IF /I '%FolderName%'=='21' (
  137. Set "Name=LPT8"
  138. goto MakeFolderNow
  139. )
  140. IF /I '%FolderName%'=='22' (
  141. Set "Name=LPT9"
  142. goto MakeFolderNow
  143. )
  144.  
  145. goto CreateFolder
  146.  
  147. :MakeFolderNow
  148. cls
  149. call :Logo
  150. call :Logo2
  151. Echo(
  152. md "\\.\%location%\%Name%"
  153. If exist "%location%\%Name%\" (
  154.  
  155. Echo Folder Creation Successful!
  156. Echo(
  157. pause
  158. goto Menu
  159.  
  160. ) ELSE (
  161.  
  162. Echo Folder Creation FAILED!
  163. Echo(
  164. pause
  165. goto Menu
  166.  
  167. )
  168.  
  169. :RemoveFolder
  170. cls
  171. call :Logo
  172. call :Logo2
  173. echo(
  174. echo EXAMPLE: C:\Program Files\Intel\CON
  175. echo(
  176. set /p "locationDel=Delete Folder From Directory: "
  177. if not exist %locationDel% (goto RemoveFolder)
  178. goto DelFolder
  179.  
  180. :DelFolder
  181. cls
  182. call :Logo
  183. call :Logo2
  184. Echo(
  185. rmdir "\\.\%locationDel%"
  186. If exist "%locationDel%" (
  187.  
  188. Echo Folder Deletion FAILED!
  189. Echo(
  190. pause
  191. goto Menu
  192.  
  193. ) ELSE (
  194.  
  195. Echo Folder Deletion Successful!
  196. Echo(
  197. pause
  198. goto Menu
  199.  
  200. )
  201.  
  202. :Logo
  203. echo _______ _ ____ ___ ___ _ _
  204. echo ^|__ __^| ^| ^| _ \ ^| \ \ / (_) ^| \ ^| ^|
  205. echo ^| ^| ^| ^|__ ___^| ^|_) ^| __ _ _ __ _ __ ___ __^| ^|\ \ /\ / / _ _ __ ^| \^| ^| __ _ _ __ ___ ___ ___
  206. echo ^| ^| ^| '_ \ / _ \ _ ^< / _` ^| '_ \^| '_ \ / _ \/ _` ^| \ \/ \/ / ^| ^| '_ \^| . ` ^|/ _` ^| '_ ` _ \ / _ \/ __^|
  207. echo ^| ^| ^| ^| ^| ^| __/ ^|_) ^| (_^| ^| ^| ^| ^| ^| ^| ^| __/ (_^| ^| \ /\ / ^| ^| ^| ^| ^| ^|\ ^| (_^| ^| ^| ^| ^| ^| ^| __/\__ \
  208. echo ^|_^| ^|_^| ^|_^|\___^|____/ \__,_^|_^| ^|_^|_^| ^|_^|\___^|\__,_^| \/ \/ ^|_^|_^| ^|_^|_^| \_^|\__,_^|_^| ^|_^| ^|_^|\___^|^|___/
  209. GOTO :EOF
  210.  
  211. :Logo2
  212. echo ------------------------------------------------------------------------------------------------------------------------
  213. GOTO :EOF
RAW Paste Data