Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
ah.. i try out the example under set /? . but my windows 2000 since doesn't take that enabledelyedexpansion?
::---script start
SetLocal EnableDelayedExpansionset var=before
if "%var%" == "before" (
set var=after;
if "!var!" == "after" @echo if you see me, it work
)endlocal
::---------script end
I got the following output:C:\batch\rotation>SetLocal EnableDelayed Expansion
Invalid parameter to SETLOCAL commandC:\batch\rotation>set var=before
C:\batch\rotation>if "before" == "before" (
set var=after;
if "!var!" == "after"
)C:\batch\rotation>endlocal
****Apparently !! doesn't seem to do the job?? I try to type in cmd /V:on first before execute , and i got the same result... can anyone tell me whats going on? I am using sp4 of win2k and i just update my windows last week...

As so often with winders, the help ain't much help.
I think you need this:
SetLocal EnableDelayedExpansion
NOT this:
SetLocal EnableDelayed Expansion
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |