【发布时间】:2020-05-17 21:38:24
【问题描述】:
我想用Win10 CMD解压成txt文件,只有目录和子目录的文件名。
离我最近的是
V:\Scanned Pictures>dir *.jpg /s/d/a:-d "folderpath" > test1.txt
它只列出文件名,但也包括目录的“标题”,如:
================================================================= Not wanted
Volume in drive V is Pictures
Volume Serial Number is C1FA-29F2
Directory of V:\Scanned Pictures\1988-06 California trip
================================================================= Not Wanted
1988-06 California trip Kathleen Beach 1.jpg <<<-- Just the file name
【问题讨论】:
-
有什么理由不使用 PowerShell 并让事情变得更简单吗?
-
谢谢!!!
我从来没有打开/使用过 PowerShell 旧时(69 岁)仅限 CMD 用户 :-) -
您能否通过editing your question 澄清一下您希望输出的确切外观。目前看来,除了带有多个
=字符的行之外,您似乎想要所有内容,而您接受的答案并没有这样做。 -
谢谢!我标记了显示“只是文件名”的行,dir 命令逐行返回正确的信息,我想要的只是文件名。
标签: cmd directory windows-10