Getting a List of Just Filenames from a Folder

Q. How can I get a list of just filenames from a folder?

A. The dir command has many switches. One of the most useful, if you just want a list of filenames without any formatting, is the /b switch, which outputs just the filename in a single column with no other fluff, as the following example shows: D:\Documents\Games\Lego Star Wars>dir/b
CODE.BIN
LSW.BIN

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish