我正在批量构建代码语言,我错过了删除txt文件第一行的方法。这是我到目前为止所得到的:
FOR /F "tokens=* skip=1" %A in ('type "%filename%") do @echo %%A>> %destinationfile%
但由于某种原因这不起作用。我该怎么做?
答案 0 :(得分:2)
pnt = col - 1
就是全部,你需要。有关详细信息,请参阅more +1 %filename% > %destinationfile%
。
答案 1 :(得分:1)
批处理应该是这样的:
@echo off
set filename=log.txt
set destinationfile=dest.txt
If exist %destinationfile% del %destinationfile%
FOR /F "tokens=* skip=1" %%A in ('type "%filename%"') do (@echo %%A >> %destinationfile%)
start "" %destinationfile%