It is important to remember that extended text should look exactly as if you were just using a command from the command line. (there are actually a few exceptions, but this is a good starting point).
To debug your script, simply echo it before your call: @echo call %1 . Now try to run as you did before: blah.bat "echo 'hello'" creates a call "echo 'hello'" . Try to run this from the command line - this will not work. You want call echo 'hello' .
One fix would be to slightly modify your script: the ~ modifier separates the quotation marks from the argument
@echo off call %~1
Or you can skip the call and just use the following (unless you call another batch file from which you want to return)
@echo off %~1
If there are no other arguments on the command line, you might be better off using %* , which will expand to all arguments
@echo off %* REM or call %*
Now you can challenge your party like this
blah.bat echo "hello"
Keep in mind that the party has all kinds of special cases that are likely to require additional or different coding to work. Too many lists - just expect the unexpected.
source share