totaled.blogg.se

Comment in windows batch file
Comment in windows batch file






comment in windows batch file

In this chapter, I'll discuss the commands that are particularly useful in batch files and will give you some examples of the three categories of batch files I find useful. In Chapter 11, I discussed all the commands built in to the CMD shell. This kind of job is a snap for a batch file but would be a nightmare to reenter through the GUI. This batch file could reconstruct the entire set of domains if it is necessary to move to a new server. For example, I have a batch file that documents all the Internet domains managed by my Windows 2000 Server's DNS service. In my work, these tend to involve custom-developed command-line programs for data-processing applications or Microsoft-provided utilities used to manage Windows-both the standard tools and those provided with the Windows Resource Kits. Monster batch files that perform a long sequence of tasks and handle a variety of command-line options.

comment in windows batch file

I use a batch file to update a ZIP file and e-mail the results so the whole job is taken care of with one command. For example, I frequently have to send updated versions of a particular set of files to a client. Medium-sized files that perform a specific series of commands that I find myself typing over and over.This way, I can open a Command Prompt window, type one word, and be ready to work with a particular project's files. For example, I have several little batch files that change the working directory to the correct folder for specific projects, and perhaps add a directory to the search path. Tiny files to manipulate the command-line environment.In my work as both a software developer and writer, I've found that the batch files I write fall into three categories: Furthermore, like Windows Script programs, batch files serve as a form of documentation, because they capture critical business management information-procedures and configuration data-in written form. So, just as it's an advantage to have both small and large wrenches in your toolbox, it's an advantage to know how to write both scripts and batch files. WSH scripts give you great control of the details of a task, whereas batch files let you work at a grosser, macro level. Why? Whereas Windows Script Host programs use objects as tools to perform Windows management and data-processing tasks, batch files use entire programs as their tools. While Windows Script Host is a powerful scripting and programming environment, the old-fashioned batch file can still be a useful, powerful tool in the Windows XP environment. You should be familiar with the material in Chapter 11, "The CMD Command-Line Environment," before starting this chapter.Like scripts, batch files can serve as documentation of critical business procedures.The batch file language in Windows XP is greatly improved over the DOS/Win9x version.Batch files let you automate repetitive tasks and create nifty command shortcuts.








Comment in windows batch file