【发布时间】:2022-01-20 21:31:11
【问题描述】:
这段代码是什么意思?谁能给我解释一下?
set "txt=!txt:~0,-1!"
@echo off
setlocal EnableDelayedExpansion
set "txt="
set input=input.txt
for /f "delims=" %%a in (%input%) do (
set "txt=!txt!%%a,"
)
set "txt=!txt:~0,-1!"
>new.txt echo !txt!
【问题讨论】:
标签: batch-file cmd