2017-06-13 35 views
0

私は私のプログラムを開いたときに閉じると私は何が間違っているのか分からない?私のプログラムが終了し、なぜ私はわからない

@echo off 
 
title test 
 
echo wat is het wachtwoord? 
 
SET /p hoi =: 
 
if "%hoi%" == "hallo" 
 
goto idk 
 

 
:idk 
 
xcopy /s "E:\Windows.old\Program Files\WindowsApps\Microsoft.3DBuilder_11.1.9.0_x64__8wekyb3d8bbwe\test" "D:\" 
 
pause() 
 

 
:exit 
 
EXIT

+0

'CD/D 'とタイプを使用して、バッチファイルを開く代わりに、コマンドプロンプトウィンドウを開き、バッチファイルのパスを操縦するために、ダブルクリックしないでください実行するバッチファイルの名前。 '@echo off'行を削除した後に、出力とエラーメッセージがすべて表示されます... – aschipfl

答えて

1
... 
if "%hoi%" == "hallo" goto idk 

:: Note the `goto` must be on the same line as the `if` 
:: Note also that if the above test fails, batch will simply continue 
:: executing commands, so the next command to be executed 
:: will be the "xcopy" following 

:idk 
xcopy /s "E:\Windows.old\Program Files\WindowsApps\Microsoft.3DBuilder_11.1.9.0_x64__8wekyb3d8bbwe\test" "D:\" 
:: 
:: PAUSE takes no parameters. The `()` will cause the `pause` not 
:: to be recognised - `cmd` will attempt to execute a command "pause()" 
:: and fail. 
pause 
... 
関連する問題