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