0
在一個目錄中,我想將每個文件名都存入一個變量,然後將變量回顯到屏幕上。獲取變量中的文件名並回顯它們
REM Example 1 works but does not put filename in variable
FOR %%F in (*.*) do (
echo %%F
)
REM Example 2 here I try to put the filename into a variable named x but when I run it it only displays the filename of
FOR %%F in (*.*) do (
set x=%%F
echo %x%
)
我該如何解決這個問題?
...一百萬的問題[延遲擴展(http://ss64.com/nt/delayedexpansion.html)... – aschipfl