Skip to content

Instantly share code, notes, and snippets.

@yell0wsuit
Created February 15, 2022 04:05
Show Gist options
  • Save yell0wsuit/a4bbc07f80563eef62473b9b74828ff3 to your computer and use it in GitHub Desktop.
Save yell0wsuit/a4bbc07f80563eef62473b9b74828ff3 to your computer and use it in GitHub Desktop.
List only files in the current folder and subfolder inside it.
dir /b /o:n /s /a:-d > onlyfilespls.txt
From https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/dir
/b: Displays a bare list of directories and files, with no additional information. The /b parameter overrides /w.
/o:n: Sorts the output according to name (alphabetically).
/s: Lists every occurrence of the specified file name within the specified directory and all subdirectories.
/a:-d: Displays only the names of those files. -d means excluding directories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment