Thank you Matthew and John for the suggestions - I didnt find the page on "concatenate_strings_in_input_file" during my search for an answer so thanks.
In case anyone else is interested in this in the future - these are the macros I ended up writing:
' List of data files for seq refinement
#list File_Name Temperature identifier{
xye\1041576-mac-001.xye 80 1041576
xye\1041577-mac-001.xye 90 1041577
...
}
macro ident { identifier(Run_Number) }
macro file_stem{hkls_}
macro temp_hold{Temperature(Run_Number)}
macro file_temp(temp_hold){_##temp_hold}
macro temp{file_temp(temp_hold)}
macro suffix{.txt}
macro file_dets(file_stem,ident, temp, suffix){file_stem##ident##temp##suffix}
macro file{file_dets(file_stem,ident, temp, suffix)}
Which then went into sequential pawley refinement and this output macro:
Create_hklm_d_Th2_Ip_file(file)
and results in files with the names:
hkls_1041576_80.txt
hkls_1041577_90.txt