The `ls` command is hard-wired into your brain, how to make it work in windows?

What I generally do is to create a folder like %USERPROFILE%/commands, then I add that folder to the PATH.

To change the “environment variables” for your account just search for “environment” on the start menu.

Then it’s simply a matter of creating *.bat files with the desired names.

For instance you could save a ls.bat file with just this content:

And you could save a ll.bat file pointing to ls.bat.

When you run it the output will be something like this:

You could also save a home.bat file that will change your directory to wherever you say “home” is. Any command you find yourself using repeatedly goes there.

Say, for instance, that you never know if it’s whereis (linux) or where (windows), just save yourself a whereis.bat file on the commands folder with the following:

And now, if you run it:

Presto! 😉

Leave a Reply

Your email address will not be published. Required fields are marked *