This is an internal method, building the command for a particular file.

def buildCommand(self,fileName,count,args):
        """
        This is an internal method, building the command for a particular file.
        """
        # Escape all placeholders in the file path:
	fileNameWithPath = self.escapePlaceholders(fileName)

        # The command is split into 'parts', which are separated by blank spaces:
        commandParts = args.command.split(' ')
        processedParts = []
        # Each part of the command is processed separately:
        for part in commandParts:
            processedParts.append(self.buildPart(part,fileNameWithPath,count,args))
        # The parts are put together at the end and the new command is returned:
        return self.unescapePlaceholders(' '.join(processedParts))