在文件名中有空格的另一个批处理文件中调用子程序?

Call subroutine inside another batch file that has spaces in the filename?

我一直在查看一些关于如何在另一个批处理文件(即 Call a subroutine in a batch from another batch file )中调用子例程的示例,但是外部批处理文件以某种方式以常规方式执行,即从头到尾,调用函数 ignored/skipped.

我认为它与外部批处理文件中的空格有关:

:: main batch file.cmd where the subroutine is called from
CALL "second batch file.cmd" :SUBROUTINE
goto :EOF

:: second batch file.cmd contents

ECHO IGNORE THIS
goto :EOF

:SUBROUTINE
ECHO SUBROUTINE CALLED FROM 'main batch file.cmd'!
goto :EOF

这不是应该的吗?对我来说不是:/

作为第二个批处理文件的第一行输入:

IF "%1"==":SUBROUTINE" GOTO :SUBROUTINE