@echo off setlocal enableDelayedExpansion pushd %1 for /f "usebackq delims=" %%a in (` dir /b /ad `) do ( set str=!str! "%%a" ) echo %str%复制代码