- A+
所属分类:系统文档
BAT:
-
@echo off&setlocal enabledelayedexpansion
-
for %%i in (*.txt) do (
-
set "f=%%i"
-
for /f "usebackq delims=" %%j in ("!f!") do set/a n+=1
-
set/a n-=1
-
for /f "delims=" %%m in ('"type "!f!"|more& cd. 2^>!f!"') do set/a x+=1&if !x! leq !n! echo;%%m>>!f!
-
set/a n=0,x=0
-
)
-
pause
PYTHON3
-
import os
-
import sys
-
-
try:
-
file_name = sys.argv[1]
-
except Exception as e:
-
print('请拖放待处理文件到本脚本')
-
with open(file_name, 'r') as f:
-
lines = f.readlines()
-
with open(file_name, 'w') as f:
-
f.write(''.join(lines[2:]))
- 我的微信
- 这是我的微信扫一扫
- 我的微信公众号
- 我的微信公众号扫一扫