我有几个包含文件的文件夹。文件可以具有相同的名称。我想将文件连接到每个名称之一。提前致谢。
EDIT:抱歉,您能给我看一下它的批处理文件吗?
合并.bat
@echo off
# for every text file in
# the sub-dirs of current dir
for /r "." %%a in (*.txt) do (
# filename without path and extension
echo %%~na
# read file and append it to file with
# the same name prefix in current dir
type %%a >> %%~na-merged.txt
)
merge_all_in_one.bat
@echo off
for /r "." %%a in (*) do (
type %%a >> all_merged.txt
)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)