Fill in pattern in various file formats