It??™s a common error not to include the /T command line switch, so you should watch for
the error in your own code.
Third, the example creates a header for the data. Notice the use of the special ECHO. command
to create a blank space in the output. The addition of the period prevents echo from displaying its
status. Because there isn??™t any other data to display, the ECHO command simply displays a blank line.
The remainder of this example outputs a temporary file listing. Figure 5.6 shows typical output from
this example.
Figure 5.6
It??™s important to
create identifying
information for the
data files you produce
with a batch file.
Adding the identifying information to the data file is fine when you don??™t want to maintain
backups of previous data and when the data resides on the original machine. Of course, things
change when you want to create a historical view of the data or store the information in a centralized
location. In this second instance, you need a unique filename for every submission. Listing 5.6
154 CHAPTER 5 CREATING CMD AND BAT FILES
shows how to add the information to the filename, rather than the data file. You can obtain this
example on the Sybex Web site at http://www.
Pages:
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409