ahsant
ahsant

Reputation: 1053

Echo is off, even if variable has the value

I have this code, and I am getting "Echo is off". I know this means variable does not have a value whenever we get "Echo is off". but in following case value is there.

@echo off
set message = Hello World 
echo %message%

Upvotes: 0

Views: 354

Answers (1)

ahsant
ahsant

Reputation: 1053

Thanks to Squashman, anyone who will face same issue. get rid of the space between 'message' and '='

@echo off
set message= Hello World 
echo %message%

Upvotes: 1

Related Questions