Prev | Current Page 403 | Next

John Paul Mueller

"Administering Windows Server 2008 Server Core"

TXT file and passes them to a secondary routine.
The secondary FOR loop processes the individual file entries returned by the Dir command.
Notice the two additions to the FOR command. First, you must provide the ???delims==??? option so
that the FOR loop doesn??™t cut off the paths at the first space. Second, notice that this FOR loop doesn??™t
process the data as a file; it uses the command representation instead. Remember that single quotes
are for commands and double quotes are for strings. The resulting Output.CSV file contains a pure
string representation that you could open in Notepad if desired. However, the power of this particular
routine is that you can also open it as a database in a database application or even in Excel.
Figure 5.7 shows typical output presented in Excel.
Figure 5.7
CSV files make it
very easy to move data
to a spreadsheet or
database.
MANAGING WINDOWS IN A NEW WAY 157
Managing Windows in a New Way
This chapter has demonstrated the functionality that batch files can provide. If you work at the
command line very often, you should have a full set of batch files to augment your toolkit. Batch
files are a very simple form of programming that can produce dramatic results because they rely on
the power of the commands that Windows provides at the command prompt.


Pages:
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415
Wczasy nad morzem kasyno kino azjatyckie bwin out of home advertising