FileContents = "X".PadRight(FileSizeBytes - 1, "X") Where: * FileContents is the string to populate * FileSizeBytes is the number of repetitions (Remember that "-1" is valid as we have already specified the first character as being "X", which is to be padded on.