Thanks! I tried the one you suggested, as well as
...\\XAS\\mca_CeNO3_I1\\mca_{:05}Both give this error:
File "\\...\home\s\myacc\Documents\Python Scripts\Functions.py", line 129, in sum_import_data_2 current_mca = os.listdir(mca_file) FileNotFoundError: [WinError 3] The system cannot find the path specified: '\\\\...\\home\\s\\myacc\\Documents\\XAS\\mca_CeNO3_I1\\mca_{:05}', so I'm guessing listdir doesn't work properly with this definition of mca_file and I should switch to another command.