Cypher 当前离线
列兵
svke 当前离线
上等兵
TOP
aloha20200628 当前离线
上尉
@echo off &setlocal set "tFiles=D:\txt\*.txt" set "inEnc=unicode" powershell "$listF=& cmd /c dir/b/s/a-d """%tFiles%"""; foreach ($F in $listF) { $FF=$F+'.new'; $s=[io.file]::readalltext($F,[text.encoding]::%inEnc%);[io.file]::writeAlllines($FF,$s) }" endlocal&exit/b复制代码
ShowCode 当前离线
VIP1
@echo off cd /d "%~dp0" powershell "Get-ChildItem *.txt | ForEach-Object {$NewName = $_.Basename + 'New' + $_.Extension; Get-Content $_ | Out-File -Encoding UTF8 $NewName}"复制代码