Computing.Net > Forums > Windows 2000 > enabledelayedexpansion not work?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

enabledelayedexpansion not work?

Reply to Message Icon

Name: taiwf
Date: September 22, 2005 at 23:07:26 Pacific
OS: win2k
CPU/Ram: p4 celeron/512Mb
Comment:

ah.. i try out the example under set /? . but my windows 2000 since doesn't take that enabledelyedexpansion?

::---script start
SetLocal EnableDelayedExpansion

set 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 command

C:\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...



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: September 23, 2005 at 00:16:16 Pacific
Reply:

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: enabledelayedexpansion not work?

My sound card does not work in win 2000 www.computing.net/answers/windows-2000/my-sound-card-does-not-work-in-win-2000-/27473.html

IE, Outlook connection not working www.computing.net/answers/windows-2000/ie-outlook-connection-not-working/51175.html

Games not working www.computing.net/answers/windows-2000/games-not-working/26223.html