I want to use ls in windows command prompt and make it run the dir command.
How can I do that?
If you just want to have cmd recognize ls as an alias for dir, you can use the doskey command (from this answer on superuser).
ls
dir
doskey
This does not change the original command line parameter handling of the dir command.