Skip to content

Instantly share code, notes, and snippets.

@Ancientwood
Last active July 23, 2021 06:20
Show Gist options
  • Save Ancientwood/b08fe6eeb91bc198fdb91b7724da6a86 to your computer and use it in GitHub Desktop.
Save Ancientwood/b08fe6eeb91bc198fdb91b7724da6a86 to your computer and use it in GitHub Desktop.
@echo off
doskey clear=cls
doskey desktop=cd %USERPROFILE%\Desktop
doskey ls=dir /o /p /d $1
doskey pwd=cd
doskey cp=copy $*
doskey mv=move $*
doskey rm=if exist $1\nul (rmdir /s $1) else del $1
doskey grep=findstr $*
doskey killport=netstat -ano ^| findstr :$1 ^> tempport$tFOR /F "tokens=5 delims= " %%P IN (tempport) DO TaskKill.exe /PID %%P /T /F$tdel tempport
doskey ping=if $1==local (ping 127.0.0.1) else if $1==baidu (ping www.baidu.com) else if $1==google (ping www.google.com) else (ping $*)
reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t REG_EXPAND_SZ /d "%"USERPROFILE"%\cmd_alias.cmd" /f
reg delete "HKCU\Software\Microsoft\Command Processor" /v AutoRun
@Ancientwood
Copy link
Author

@Ancientwood
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment