Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 3 years ago

Display all file names in a directory on command prompt?

Is there a way to display all of the files in a directory on command prompt?

I know you can access / work within a directory by simply entering cd followed by its absolute path, but it would be very useful I think to get the names of the files in the directory.

Will award best answer promptly

Update:

I'm using Windows 10 btw

2 Answers

Relevance
  • 3 years ago
    Favorite Answer

    In Microsoft OSes: dir

    In GNU/Linux OSes: ls

    Because Yahoo! Answers uses a sans-serif font, where lowercase "L" and uppercase "i" look the same, I must clarify that "ls" is lowercase "LS".

    PS: Dear Yahoo! Answers maintainers:

    Why? Why? Why? Why? Just switch to a serif font, would ya!

    • Commenter avatarLogin to reply the answers
  • 3 years ago

    dir or dir/w

    • Commenter avatarLogin to reply the answers
Still have questions? Get your answers by asking now.