- PR -

delayed environment variable

1
投稿者投稿内容
Oregon
ベテラン
会議室デビュー日: 2001/08/01
投稿数: 52
お住まい・勤務地: Tualatin 97062
投稿日時: 2001-08-08 05:36
is "delayed environment variable" working?

set LIST=
for %%i in (*) do set LIST=!LIST! %%i
echo %LIST%

a sample code in 'for /?' does not work
both in commandline and in script.

C:\> ver
Microsoft Windows 2000 [Version 5.00.2195]
yamachan
会議室デビュー日: 2001/08/02
投稿数: 18
お住まい・勤務地: 東京に生息
投稿日時: 2001-08-08 16:18
Hi Oregon,

Normally, "delayed environment variable" is disabled.
Try "/v:on" option of CMD.EXE. :-)
Oregon
ベテラン
会議室デビュー日: 2001/08/01
投稿数: 52
お住まい・勤務地: Tualatin 97062
投稿日時: 2001-08-09 00:58
thanks! now it works.

as an interesting application
here's a self copying script,
well almost


for /f "tokens=1* delims=" %%i in (%0) do @set FOO=%%i & echo !FOO:FOO=BAR!

1

スキルアップ/キャリアアップ(JOB@IT)