set fso=CreateObject("Scripting.FileSystemObject")
set file=fso.Opentextfile("文件1.txt")
set fileN=fso.Createtextfile("转换后的文件1.txt")
str=file.readall
strN=replace(str,"|",chr(10))
fileN.write strN
fileN.close
@echo off
for /f "tokens=1-5,* delims=|" %%a in ('type 1.txt^&cd.^>1.txt^') do (
(if not '%%a==' echo.%%a
if not '%%b==' echo.%%b
if not '%%c==' echo.%%c
if not '%%d==' echo.%%d
if not '%%e==' echo.%%e
if not '%%f==' echo.%%f)>>1.txt
)