Last active
January 29, 2018 08:41
-
-
Save jcalano/772a1b45803b1e730cb5 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;= @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
I found this alias script several years ago and just now found this site where it can be shared. I've modified it a bit to suit my purposes.
All credit for this script goes to Ben Burnett.
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.
Installation:
Save the alias.bat file to the computer's hard drive in a convenient location. I saved mine to c:.)
WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
The Windows System Registry contains keys and values directly associated with various Windows operating system components. Manually modifying these keys or values may be helpful in terms of diagnosing and/or eliminating specific issues, but improper handling of these items may produce other unrelated or otherwise unexpected problems. Such problems may include, but are not limited to, permanent data loss and/or file corruption.
I assume no responsibility for problems caused to the system as a result of the mishandling of the system registry. For this reason, it is strongly recommended that you back up the system registry before making any changes to it.
Please review the following link to learn how to backup the Windows registry.
https://support.microsoft.com/en-us/kb/322756
END WARNING! END WARNING! END WARNING! END WARNING! END WARNING! END WARNING! END WARNING!
Proceed at your own risk.
Modify the Windows registry. (Be CAREFUL!)
Open the command prompt and type "regedit" (without the quotes (" "))
Double-click HKEY_LOCAL_MACHINE
Double-click SOFTWARE
Double-click Microsoft
Right mouse click Command Processor and select New | String Value
Enter AutoRun as the String Value
Double-click the new entry named AutoRun and in the Value data: field enter the location where alias.bat was saved.
Example: c:\alias.bat
Click OK and exit the registry editor.
The above process will load the alias.bat file every time the command console is launched.