Bra*_*nor 2 windows filenames org-mode
我想结合一些文本文件,但带有标题(编辑:文件名)。理想情况下,类似
* a filename
contents of file
...
* another filename
contents of file
...
etc...
Run Code Online (Sandbox Code Playgroud)
我使用的是 Windows(不是 DOS),但可以访问 powershell、pandoc、emacs、cygwin 或您推荐的任何其他工具。(显然我是一个尝试组织模式的新手。)
我可以轻松地将它们全部放在一个文件夹中。但我想避免输入每个文件的名称。如果推荐一个bat文件,我没用过,但愿意学习。
我相信有更聪明的东西,但这里有一个 powershell 脚本将组合所有文件:
$files = (dir *.txt)
$outfile = "out.txt"
$files | %{
$_.FullName | Add-Content $outfile
Get-Content $_.FullName | Add-Content $outfile
}
Run Code Online (Sandbox Code Playgroud)
它有效率吗?不是很糟糕......但它会在紧要关头工作。
| 归档时间: |
|
| 查看次数: |
9467 次 |
| 最近记录: |