dir /s /b
^ ^
| |
| Displays a **bare** list of directories and files, with no additional information.
|
~ Lists every occurrence of the specified file name within the
specified directory and all **subdirectories**.
findstr /e
^
|
Matches the text pattern if it is at the **end** of a line.
4条答案
按热度按时间7kjnsjlb1#
你可以试试这个
或
或
ozxc1zmp2#
我不知道它为什么会这样,但它可以工作:
dir /b /s .txt | findstr /e .txt
.很丑,但很好用。8ljdwjyq3#
dir C:\XML /s /b | findstr /e .xml > C:\XML\list.txt
这对我很有效,只需将.xml扩展名更改为.txt
dz6r00yl4#
拆分命令以便更好地理解: