【发布时间】:2014-12-24 02:27:21
【问题描述】:
我有一个包含将近一千个 html 文件的目录。每个文件都需要根据重复出现的模式(标题)分成多个文本文件。我在 Windows 机器上,使用 GnuWin32 工具。
我已经找到了一种方法来处理单个文件:
csplit 1.html -b "%04d.txt" /"Words in heading"/ {*}
但我不知道如何对整个 HTML 文件集重复此操作。这个:
csplit *.html -b "%04d.txt" /"Words in heading"/ {*}
不起作用,这个也不起作用:
for %i in (*.html) do csplit *.html -b "%04d.txt" /"Words in heading"/ {*}
两者都会导致无效的模式错误。非常感谢您的帮助!
【问题讨论】: