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
)
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
批处理ren重命名的方式
批处理之ren命令-可批量修改文件名1.批处理批量修改文件后缀名(假设我需要把一个文件夹中的很多txt文件改为sql文件): 1)在需要被处理的文件的文件夹里先...
[阅读全文]
-
-
-
-
-
-
-
-
-
-
网友评论