slyfox1186

Custom DOSKEY Commands

Jul 17th, 2019
658
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 4.73 KB | None | 0 0
  1. @ECHO OFF
  2. COLOR 06
  3.  
  4. GOTO DOSKEYCOMMANDLIST
  5. ...skip this...
  6. :comment
  7. $G Redirects output. Use either of these special characters to send output to a device or a file instead of to the screen. This character is equivalent to the redirection symbol for output (>).
  8. $G$G Appends output to the end of a file. Use either of these double characters to append output to an existing file instead of replacing the data in the file. These double characters are equivalent to the append redirection symbol for output (>>).
  9. $L Redirects input. Use either of these special characters to read input from a device or a file instead of from the keyboard. This character is equivalent to the redirection symbol for input (<).
  10. $B Sends macro output to a command. These special characters are equivalent to using the pipe (**
  11. $T Separates commands. Use either of these special characters to separate commands when you create macros or type commands on the doskey command line. These special characters are equivalent to using the ampersand (&) on a command line.
  12. $$ Specifies the dollar-sign character ($).
  13. $1 through $9   Represent any command-line information you want to specify when you run the macro. The special characters $1 through $9 are batch parameters that enable you to use different data on the command line each time you run the macro. The $1 character in a doskey command is similar to the %1 character in a batch program.
  14. $* Represents all the command-line information that you want to specify when you type the macro name. The special character $\* is a replaceable parameter that is similar to the batch parameters $1 through $9, with one important difference: everything you type on the command line after the macro name is substituted for the $\* in the macro.
  15. :DOSKEYCOMMANDLIST
  16.  
  17. ::::::: PROMPT ::::::
  18. SET P1=PROMPT $G
  19. SET P2=PROMPT $P$G
  20.  
  21. ::::::: CECHO :::::::
  22. SET "CG=CECHO {0A}"
  23. SET "CR=CECHO {0C}"
  24. SET "CT=CECHO {03}"
  25. SET "CY=CECHO {0E}"
  26. SET "CN={\n}"
  27.  
  28. ::::::: START :::::::
  29. SET "TKCMDXIT=$T TASKKILL /F /IM "cmd.exe" $T EXIT"
  30.  
  31. :: DIRECTORY COMMANDS ::
  32. DOSKEY CAT=TYPE $*
  33. DOSKEY CP.=COPY $*
  34. DOSKEY D.=DIR $*
  35. DOSKEY DE.=DIR /B /O:E $B FINDSTR /R /I "$1"
  36. DOSKEY DN.=DIR /B /O:N $B FINDSTR /R /I "$1"
  37. DOSKEY DX.=DIR /X $*
  38. DOSKEY DK=DOSKEY /?
  39. DOSKEY DKM=DOSKEY /MACROS
  40. DOSKEY LL=CLS $T DIR
  41. DOSKEY MV=MOVE $*
  42. DOSKEY RM=DEL $*
  43.  
  44. :: CHANGE DIRECTORY ::
  45. DOSKEY CD.=CD %%$1%%
  46. DOSKEY .=CD ..\$*
  47. DOSKEY ..=CD ..\..\$*
  48. DOSKEY ...=CD ..\..\..\$*
  49. DOSKEY ....=CD ..\..\..\..\$*
  50. DOSKEY CDPD=CD C:\ProgramData
  51. DOSKEY CDPF1=CD C:\Program Files
  52. DOSKEY CDPF2=CD C:\Program Files (X86)
  53. DOSKEY CDW=CD C:\Windows
  54. DOSKEY CDE=CD %OneDrive%\Downloads
  55. DOSKEY CDF=CD %OneDrive%\Documents
  56. DOSKEY CDD=CD %OneDrive%\Desktop
  57.  
  58. :: SYSTEM32 AND SYSTEM64 ::
  59. SET S32=C:\Windows\System32
  60. SET S64=C:\Windows\SysWOW64
  61.  
  62. :: COMMAND COM ::
  63. DOSKEY IPC=IPCONFIG
  64. DOSKEY IPCA=IPCONFIG /ALL
  65. DOSKEY IPCF=IPCONFIG /FLUSHDNS
  66. DOSKEY IPCR=IPCONFIG /REGISTERDNS
  67. DOSKEY IPCRS=IPCONFIG /RESET
  68. DOSKEY PS=TASKLIST $*
  69. DOSKEY SFC=SFC /SCANNOW
  70.  
  71. :: DISM ::
  72. DOSKEY DISMCAB=DISM /ONLINE /ADD-PACKAGE /PACKAGEPATH:"$1"
  73.  
  74. :: SHUTDOWN ::
  75. DOSKEY SD=%OneDrive%\Desktop\Shutdown.lnk
  76. DOSKEY SDA=SHUTDOWN /A
  77. DOSKEY SDR=SHUTDOWN /R /T 1 $T TIMEOUT 1 >NUL $T TASKKILL /IM wlrmdr.exe
  78. DOSKEY SDG=SHUTDOWN /G /T 1 $T TIMEOUT 1 >NUL $T TASKKILL /IM wlrmdr.exe
  79. DOSKEY SDFW=SHUTDOWN /R /FW /T 1 $T TIMEOUT 1 >NUL $T TASKKILL /IM wlrmdr.exe
  80.  
  81. :: START PROGRAMS ::
  82. DOSKEY E.=explorer $* $T %TKCMDXIT%
  83. DOSKEY E..=explorer %%$1%%
  84. DOSKEY NP.=C:\Program Files\Notepad++\notepad++.exe $*
  85. DOSKEY P.=ECHO.%!!.%
  86. DOSKEY ST7Z=START /MAX 7ZFM /B %TKCMDXIT%
  87. DOSKEY AHK="%PROGRAMFILES%\AHK\AutoHotkey.exe" %TKCMDXIT%
  88. DOSKEY STBRU=BULKRENAMEUTILITY %TKCMDXIT%
  89. DOSKEY STCC=CCLEANER64 %TKCMDXIT%
  90. DOSKEY STE=ECMD64 %TKCMDXIT%
  91. DOSKEY STFD=FUZEDRIVE %TKCMDXIT%
  92. DOSKEY STFF=FIREFOX %TKCMDXIT%
  93. DOSKEY STG=GIMP-2.10 %TKCMDXIT%
  94. DOSKEY STIM=Magick $1
  95. DOSKEY STLC=LCORE %TKCMDXIT%
  96. DOSKEY STNP=NOTEPAD++ %TKCMDXIT%
  97. DOSKEY STOSSL=OPENSSL %TKCMDXIT%
  98. DOSKEY STOT=OTCONVERTIT %TKCMDXIT%
  99. DOSKEY STP=PUTTY %TKCMDXIT%
  100. DOSKEY STR=RUFUS_3.5 %TKCMDXIT%
  101. DOSKEY STUT=UTORRENT %TKCMDXIT%
  102. DOSKEY STVLC=VLC %TKCMDXIT%
  103. DOSKEY STWT=WINAEROTWEAKER %TKCMDXIT%
  104.  
  105. :: WINDOWS APPS ::
  106. DOSKEY STCP=CONTROL
  107. ::DOSKEY STCP=CONTROL %TKCMDXIT%
  108. DOSKEY STDEV=DEVMGMT %TKCMDXIT%
  109. DOSKEY STDISK=DISKMGMT %TKCMDXIT%
  110. DOSKEY STENV=RUNDLL32.EXE sysdm.cpl,EditEnvironmentVariables %TKCMDXIT%
  111. DOSKEY STEV=EVENTVWR %TKCMDXIT%
  112. DOSKEY STFW=WF %TKCMDXIT%
  113. DOSKEY STGPE=GPEDIT %TKCMDXIT%
  114. DOSKEY STI=explorer Shell:::{87D66A43-7B11-4A28-9811-C86EE395ACF7} %TKCMDXIT%
  115. DOSKEY STNC=NCPA.CPL %TKCMDXIT%
  116. DOSKEY STNPLW=NETPLWIZ %TKCMDXIT%
  117. DOSKEY STREG=REGEDIT %TKCMDXIT%
  118. DOSKEY STRM=PERFMON /RES %TKCMDXIT%
  119. DOSKEY STS=SERVICES.MSC %TKCMDXIT%
  120. DOSKEY STTS=TASKSCHD.MSC %TKCMDXIT%
Advertisement
Add Comment
Please, Sign In to add comment