Creating ls command in Windows

Create a ls.bat file with the contents:
dir %1
the %1 is the parameters passed into the command so that you can do ls My Documents or just ls.

There are different places to put the ls.bat file but as long as it’s in the %PATH% environment variable it doesn’t matter where it is.

For example creating it in C:\windows\system32 requires no further changes if you have access to that directory.

This method can be applied to other commands too.

How to create ls in windows command prompt?

About Danny

I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog. Danny also has participates in a part time project called Energy@Home [] for monitoring energy usage on a premise. Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school. View all posts by Danny → This entry was posted in Windows and tagged , , , , , . Bookmark the permalink.

Leave a Reply

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

All comments must go through an approval and anti-spam process before appearing on the website. Please be patience and do not re-submit your comment if it does not appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.