Created
February 15, 2022 04:05
-
-
Save yell0wsuit/a4bbc07f80563eef62473b9b74828ff3 to your computer and use it in GitHub Desktop.
List only files in the current folder and subfolder inside it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Get-ChildItem -Recurse -File | Sort-Object | ForEach-Object { $_.FullName }
PowerShell equivalent.