请帮帮我。
我想将Final.txt设置为批量变量。
在Final.txt里面这样:
7-Zip 15.12 (x64)
Adobe Reader XI (11.0.10)
Advanced BAT to EXE Converter v2.94
AIMP3
答案 0 :(得分:0)
@echo off
REM Creating a Newline variable (the two blank lines are required!)
set NLM=^
set NL=^^^%NLM%%NLM%^%NLM%%NLM%
setlocal enableDelayedExpansion
set "content="
set fileLocation=final.txt
for /f "useback tokens=* delims=" %%# in ("%fileLocation%") do (
set "content=!content!!NL!!%%#"
)
echo =======
echo %content%
echo =======