不清楚你的实际情况,仅以问题中的样例为据
@echo off
set #=q&set/ax=0x53b7e0b4
title Any question +%#%%#% %x%
cd /d "%~dp0"
md ".\结果\" 2>nul
powershell ^
dir . *.txt^|%%{^
write-host $_.FullName;^
$text=@(gc $_.FullName)^|%%{$_ -replace '^^ ',''};^
out-file -file ('.\结果\'+$_.Name) -input ($text -join \"`r`n\") -enc Default;^
}
echo;Any question +%#%%#% %x%
pause