The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Windows & DOS: Issues & Discussions
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 03-22-2009
carlos25 carlos25 is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 10
I know I'm rather late on this but it might help others...

You can use doskey to create an alias on any version of windows up to Windows XP (I'm not sure if it's available on Vista).
Code:
C:> doskey alias_name=command
doskey will only work within the environment that it's invoked in and if you want the aliases to be available every time you start cmd.exe will need to write a script that will load them upon invoking your cmd prompt (cmd /K "My_Environment_Script.bat").

Example:

I often need to change drives and cd doesn't handle it very well but chdir does. However, the length of the command is tiresome to type every time I need it so I do this...
Code:
doskey cdd=chdir /D %1
So when I type:

cdd F:

The command prompt will change to F:>

More information on DosKey can be found here:

DOSKey - Wikipedia, the free encyclopedia