Skip to content

Instantly share code, notes, and snippets.

@Yogendra0Sharma
Forked from jcalano/alias.bat
Created January 29, 2018 08:41
Show Gist options
  • Save Yogendra0Sharma/907b843adc0a30fd38356c99aea0dbd8 to your computer and use it in GitHub Desktop.
Save Yogendra0Sharma/907b843adc0a30fd38356c99aea0dbd8 to your computer and use it in GitHub Desktop.
Simple, but useful aliases; this can be done other means--of course--but this is dead simp works on EVERY Windows machine on the planet.
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto end
;= rem ******************************************************************
;= rem * Filename: aliases.bat
;= rem * Version: 1.0
;= rem * Author: Ben Burnett <[email protected]>
;= rem * Purpose: Simple, but useful aliases; this can be done by
;= rem * other means--of course--but this is dead simple and
;= rem * works on EVERY Windows machine on the planet.
;= rem * History:
;= rem * 22/01/2002: File Created (Syncrude Canada).
;= rem * 01/05/2007: Updated author's address, added new macros, a
;= rem * history and some new helpful comments.
;= rem * 19/06/2007: Added Notepad, Explorer and Emacs macros.
;= rem * 20/06/2007: Fixed doskey macrofile= path problem: it is now not
;= rem * a relative path, so it can be called from anywhere.
;= rem ******************************************************************
;= Doskey aliases
h=doskey /history
;= File listing enhancements
ls=dir /x $*
ll=dir /w $*
la=dir /x /a $*
x=exit $*
;= Directory navigation
up=cd ..
pd=pushd
;= Copy and move macros
cp=copy
mv=move
;= Delete macros
rm=del /p $*
rmf=del /q $*
rmtmp=del /q *~ *# 2>nul
;= Fast access to Notepad
n=notepad $*
;= Fast access to Explorer
e=explorer .
te=telnet $*
p=ping $*
ns=nslookup $*
;= :end
;= rem ******************************************************************
;= rem * EOF - Don't remove the following line. It clears out the ';'
;= rem * macro. Were using it because there is no support for comments
;= rem * in a DOSKEY macro file.
;= rem ******************************************************************
;=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment