I am unable to figure out why the value is not stored in a variable in Windows 10. I search on the internet didn't get any reason why this not working.
@echo off
:start
REM check if there are more then one argumnets
if not "%2" == "" (
echo Too many parameters entered 
) ELSE (
REM check if argument one is empty
SETLOCAL ENABLEDELAYEDEXPANSION
if "%1"=="" (
echo "Enter your Name"
SET /P filename=
echo Your Name  is "%filename %" 
) 
if "%filename%"=="" (
echo "empty"
) else (
 echo "dat"
)
) 
When I run this:
Enter your Name
asd
Your Name  is
Am I doing something wrong?
 
     
    