Using Aliases In windows CMD

If you are like me and use mac and Linux at home and use windows at work. Then the following will be regular errors.

‘ls’ is not recognized as an internal or external command, operable program or batch file.

I always use ls, clear, cat etc. in my CMD shell and eventually get the following errors. This has happened a lot of time for me to do something about it. Fortunately, there’s an easy way to setup alias in the cmd windows and never see this nasty ‘not recognised’ error. First create a text file like this.

You can use any other commands that you use regularly. Next, open the cmd windows and type the following command

Doskey /macrofile=path/to/alias/file/filename

As shown in the next figure. That’s it.

Here’s how it works, no more nag error messages

Don’t want to type this message every time, create a windows shortcut like this  

That’s it!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s