Windows脚本编程:变量信息存储与条件逻辑应用
在Windows脚本编程中,变量的信息存储和条件逻辑的应用是非常重要的部分,下面我们将详细介绍相关内容。
变量信息的存储与故事脚本实现
我们可以通过一个有趣的故事脚本来了解如何在Windows脚本中存储和检索信息。以下是一个名为“WonderDog.bat”的脚本,它能根据读者输入的信息来讲述“神奇狗狗巴兹”的故事。
@ECHO off REM *************************************************************************** REM REM Script Name: WonderDog.bat REM Author: Jerry Ford REM Date: July 1, 2003 REM REM Description: This Windows shell script tells the story of "Buzz the Wonder REM Dog" using input provided by the reader. REM REM *************************************************************************** REM Set the Windows command console to display yellow on black COLOR 0E REM Clear the display CLS REM Write the name of the story to the Windows command