Windows 脚本
@echo off
REM 文件过滤器
set file_filter=*.cpp *.h
REM 指定原目录
set src_dir=C:\Users\Lenovo\Desktop\code
REM 指定输出文件
set output_file=C:\Users\Lenovo\Desktop\code.txt
cd %curr_dir%
del %output_file%
for /F %%i in ('dir /b/s/a:-d %file_filter%') do (
type %%i>>%output_file%
)