Add the "ls" Command to a Windows Command Prompt

12/11/2014 3:10:08 AM

If you ever work with linux, you will use the "ls" command  extensively. If you then move to windows, you want to do the same. Unfortunately, this command is not available on Windows. Instead, you need to write "dir". 3 LETTERS!!!

Adding the "ls" command to your Windows prompt is very easy.

  1. Create a new file called ls.bat
  2. Edit the file in Notepad
  3. Add the content "dir" to the file and save
  4. Place this file in the Windows System32 folder
  5. or Add this file to a folder on your computer and add the location of this folder to your PATH variables.
#ls.bat
dir