Batch file 无法识别Windows脚本命令

Batch file 无法识别Windows脚本命令,batch-file,cmd,ksh,windows-scripting,Batch File,Cmd,Ksh,Windows Scripting,我试图运行cmd文件,但收到奇怪的错误。我正在运行这个: #!/bin/ksh #@echo off #REM ************************************************************************* ... ... 但返回的结果会出现如下错误: C:>#!/bin/ksh '#!' is not recognized as an internal or external command, operable program or

我试图运行cmd文件,但收到奇怪的错误。我正在运行这个:

#!/bin/ksh
#@echo off
#REM *************************************************************************
...
...
但返回的结果会出现如下错误:

C:>#!/bin/ksh
'#!' is not recognized as an internal or external command,
operable program or batch file.

C:>#@echo off
'#@echo' is not recognized as an internal or external command,
operable program or batch file.

C:>#REM *************************************************************************
'#REM' is not recognized as an internal or external command, 
operable program or batch file.

我在两台电脑上试过,结果都一样。有人能告诉我为什么会发生这种情况吗?

这是一个
ksh
脚本,通过
ksh
启动它(或任何类似
bash
sh
csh
的shell,它们理解
行),而不是windows命令行。您可能需要安装
cygwin
(使用
ksh
),启动cygwin终端并从那里启动脚本