I have made a batch file in Windows. The content in that file is like this
test.bat
echo %1
Now when I send an argument from command line like this
test.bat "hello"
then it outputs always %1. It should be hello.
What I am doing wrong?
This is really odd - something in your assumptions about what is in the file is not correct. Here is the output from my pc doing exactly what you describe:
C:\windows\system32>copy con test.bat
echo %1
^Z
1 file(s) copied.
C:\windows\system32>test.bat hello
C:\windows\system32>echo hello
hello
I suspect the file has something different in than what you describe