// List of all possible columns in your text file
text_col_list = {"tair_avg","rh_avg","rain_total","dew_point_avg","leaf_wetness_min","windspeed_avg"};
// List of all new column names, in the same order as text_col_list
jmp_col_list = {"Tair_(C)","RH(%)","Rainfall(mm)","Dew Point (C)","Leaf Wetness(mV)","Windspeed (mph)"};
dt = data table("Text File 1");
col_name_list = dt << get column names(string);
for (i = 1, i <= nitems(text_col_list), i++,
if (contains(col_name_list, text_col_list[i]),
column(dt, text_col_list[i]) << set name(jmp_col_list[i]);
);
);