bat批量去除文件首行

set n=1
:starline
for %%j in (*.txt) do (
:3
if exist D:\work\test\new_%n%.txt (set /a n+=1&goto 3)
set file=%n%.txt
for /f "skip=1 delims=" %%i in ('type "%file%"') do (
echo %%i >>D:\work\test\new_%n%.txt
)
set /a n+=1&goto starline
)
::start "" D:\work\test\new_%n%.txt
::pause>nul

 

将一批文件合并到一个文件

@echo off
for /f "delims=" %%a in ('dir/b *.txt') do (
type "%%a">>All.txt
)

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-06-12
  • 2022-12-23
  • 2022-02-01
  • 2021-07-11
  • 2021-10-08
猜你喜欢
  • 2022-12-23
  • 2021-10-19
  • 2021-05-19
  • 2022-01-28
  • 2022-12-23
  • 2022-01-09
  • 2021-09-22
相关资源
相似解决方案