所以,我正在批量编写一个计算机加速器,我对这个问题感到困惑:
@echo off
cls
color 02
:licence
title Computer Speeder 2012 (Free licence)
cls
echo This is the free version of Computer Speeder 2012.
echo.
echo Do you wish to license this copy? [Y]es or [N]o.
choice /c NY /n
if ERRORLEVEL 2 goto license
if ERRORLEVEL 1 goto startup1
:license
dir | find "validatecode.txt" > if exist "validatecode.txt"
goto bam
) else (
goto else
:bam
cls
echo Type in your lisencing code to validate this
echo copy to upgrade to the full version:
echo.
set /p vd=""
:else
cls
echo You do not have a validation file on your computer,
echo if you purchased the full version you probably
echo deleted the file. Check the recycle bin, check you
echo put it in the correct path or re-purchase the
echo software because it has an individual code.
pause
goto startup1
出于某种奇怪的原因,它按时间顺序执行所有这些代码:首先它询问您是否要许可该软件的副本。如果您按 Y,则需要您获得许可。然后它执行行 dir | 找到“validatecode.txt”>如果存在“validatecode.txt”等等。然而,它去 bam 然后去 else。代码中没有其他缺陷,我找不到任何语法错误,你们能解释一下我做错了什么吗?我是个菜鸟:/