'ls' is not recognized as an internal or external command, operable program or batch file.
I get this error when I try to glance at the files of my folder.
‘ls’ is not recognized as an internal or external command, operable program or batch file
batch-filecmdcommandls
Related Topic
- ‘else’ is not recognized as an internal or external command, operable program or batch file
- Android – ‘adb’ is not recognized as an internal or external command, operable program or batch file
- Windows 7 – ‘make’ is not recognized as an internal or external command, operable program or batch file
- C++ – Why is it called ‘wchar_t’ and not simply ‘wchar’
- Javascript – (Override || Extend) Javascript Method
- Windows – ‘touch’ is not recognized as an internal or external command, operable program or batch file
- ” is not recognized as an internal or external command, operable program or batch file
Best Answer
I'm fairly certain that the
ls
command is for Linux, not Windows (I'm assuming you're using Windows as you referred tocmd
, which is the command line for the Windows OS).You should use
dir
instead, which is the Windows equivalent ofls
.Edit (since this post seems to be getting so many views :) ):
You can't use
ls
oncmd
as it's not shipped withWindows
, but you can use it on other terminal programs (such as GitBash). Note,ls
might work on someFTP
servers if the servers arelinux
based and theFTP
is being used fromcmd
.dir
onWindows
is similar tols
. To find out the various options available, just dodir/?
.If you really want to use
ls
, you could install 3rd party tools to allow you to rununix
commands onWindows
. Such a program isMicrosoft Windows Subsystem for Linux
(link to docs).