• September 10th, 2009
  • Anritsu
  • xplorem1

We have just finished doing our Interim builds (which is a build of the software that goes out to customers). We ran into quite a lot of problems as usual! Most of the problems we encountered involved having to edit batch and properties files. I have never really worked with these types of files before so I thought i’d post up a little information about them.

In Microsoft Windows and DOS a batch file is a text file which contains a series of commands to be executed by the command interpreter (command line). When you run a batch file the shell program (cmd.exe) reads the command, normally line by line, and executes them.

They are useful for running a series of executable commands automatically and are often used to automate tedious processes. In DOS a batch file has the extension “.bat”. When you read through a batch file, you can see the indivudual commands as they would be typed in the command line.

A properties file has the extension “.properties”. It is mainly used for files in Java related technologies to store the configurable parameters of an application. Each parameter is stored as a pair of  strings, one storing the name of the parameter (called the key), and the other storing the value. The format would be written like: key = value.

Each line in a .properties file normally stores a single property. .properties files can use the # or the ! as the first non blank character in a line to denote that all text following it is a comment. The backwards slash is used to escape a character.