因此,我有一个非常简单的问题,但我略感受,因此需要一些帮助!
I need a command-line batch file that does the following:
我有5 000份文本文件,所有文件都有相同的结构(即每一行的相同领域),但数据不同。 我愿从第3和第5行中抽取所有档案的数据,并把它放入一个简单的CSV,这也标明档案名称。
For example, the text files (labled 1.txt through to 5000.txt) look like this:
[data on line 1]
[data on line 2]
[data on line 3]
[data on line 4]
[data on line 5]
[data on line 6]
而我后来在CSV的预期成果就是:
[Filename 1.txt],[Data from line 3],[Data from line 5]
[Filename 2.txt],[Data from line 3],[Data from line 5]
and so forth...
[Filename 5000.txt],[Data from line 3],[Data from line 5]
任何想法?