It’s such a small hack, but I’m not a Windows guy, and I get caught out multiple times a day typing ls instead of dir to view files in the working directory when using cmd.exe.
This is already available for PowerShell, but just a simple hack to get around this for the Windows Command Prompt.
- Create a batch file called “ls.bat”
- In the batch file, simply put “dir”
- Add this file to a location in your PATH
C:\Users\jonathan.els\Scripts>ls C:\Users\jonathan.els\Scripts>dir Volume in drive C is Windows Volume Serial Number is 0413-1979 Directory of C:\Users\jonathan.els\Scripts 16 May 2018 11:44 PM <DIR> . 16 May 2018 11:44 PM <DIR> .. 16 May 2018 11:41 PM 5 ls.bat 1 File(s) 5 bytes 2 Dir(s) 129 793 744 896 bytes free C:\Users\jonathan.els\Scripts>