@echo off set "file=D:\Production" "record\jb\rz.txt" powershell ^ $txt = gc -LiteralPath '%file%';^ $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False;^ [System.IO.File]::WriteAllLines('%file%', $txt, $Utf8NoBomEncoding); exit set声明变量文件和路径,修改格式为UTF8。 复制代码
@echo off set "file=D:\Production" "record\jb\rz.txt" powershell ^ $txt = gc -LiteralPath '%file%';^ $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False;^ [System.IO.File]::WriteAllLines('%file%', $txt, $Utf8NoBomEncoding); exit set声明变量文件和路径,修改格式为UTF8。