Skip to content

Instantly share code, notes, and snippets.

@punkmonday
Created October 14, 2021 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save punkmonday/d7c00cbba6eb3a6c75895c7d6115f045 to your computer and use it in GitHub Desktop.
Save punkmonday/d7c00cbba6eb3a6c75895c7d6115f045 to your computer and use it in GitHub Desktop.
source folder to a log file
@echo off
REM 文件过滤器
set file_filter=*.java *.js *.css
REM 指定原目录
set src_dir=D:\IdeaProjects\agk-health
REM 指定输出文件
set output_file=D:\IdeaProjects\wordcount\a.log
cd %src_dir%
del %output_file%
for /F %%i in ('dir /b/s/a:-d %file_filter%') do (
echo %%i
type %%i>>%output_file%
)
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment