0

私が助けを必要としているのは、ユーザーが文字列を入力した場合です。commandLine("Dir") 次に、Dir を取得commandLine("Dir")して変数にします。

例:

C:\> program.bat commandLine("Dir")

program.bat:

echo the command is: Dir

pause
4

1 に答える 1

1

これを試して:

echo off
set str=%1
set str=%str:CommandLine("=%
set str=%str:")=%
echo on
echo the command is: %str%
于 2013-10-04T23:41:58.567 に答える