T3RRYT3RR0R

Batch Custom Colored command prompt

Feb 16th, 2020
914
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.53 KB | None | 0 0
  1. @ECHO OFF & Setlocal EnableDelayedExpansion & TITLE %~n0
  2. cls & MODE 1000 & CD %userprofile%\desktop
  3.  
  4.  
  5.     For /F "tokens=* Delims=\" %%A In ("%userprofile%") Do (
  6.         Set "C_Prompt=%%A"
  7.         Set "C_Prompt=!C_Prompt:\=!"
  8.         Set "C_Prompt=!C_Prompt:Users=!"
  9.     For %%A in (a,b,c,d,e,f,g,h,i) Do (Set "C_Prompt=!C_Prompt:%%A:=!")
  10.     )
  11.     Set DirPath=:!CD:\=/!
  12.     For %%A in (a,b,c,d,e,f,g,h,i) Do (Set "DirPath=!DirPath:%%A:=!")
  13.     Set "C_Prompt=!C_Prompt!@!computername!!DirPath! $$ "
  14.  
  15. prompt !C_Prompt!
  16.  
  17. Start /B cmd.exe
Advertisement
Add Comment
Please, Sign In to add comment