Prev | Current Page 393 | Next

John Paul Mueller

"Administering Windows Server 2008 Server Core"

The second statement in :GetFile is the Dir command
that locates the files you want to delete based on the file specification.
Notice that the :GetFile section ends with GOTO :EOF, which should end the batch file. It does,
in fact, end the :GetFile batch file and returns control to the FOR command that called it. Now the
FOR command can process the next file extension in the list. Figure 5.4 gives you a better idea of how
this batch file works with and without DEBUG defined. Notice the batch file doesn??™t display the file
extensions the first time because DEBUG isn??™t defined yet.
The examples in this section have only shown a single level of debugging so far. However, you
can create as many levels of debugging as you want by adding some additional code. Listing 5.4
TESTING BATCH FILES 151
shows the example in Listing 5.3 with a second level of debugging added. You can obtain this
example on the Sybex Web site at http://www.sybex.com/WileyCDA/.
Listing 5.4: A Batch File with Multiple Debug Levels Defined
IF NOT DEFINED DEBUG2 @ECHO OFF
REM Set the second level of debugging.
IF DEFINED DEBUG2 SET DEBUG=TRUE
REM Locate all of the temporary files on your hard drive.


Pages:
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405
Wczasy Jastrzębia Góra zalew sulejowski jarosławiec online cash loans kolej transsyberyjska