import os path = 'c:\users\name\desktop\project\input_samples' for xyz_file in os.listdir(path): if xyz_file.endswith('xyz'): (operations of function here)In the folder 'input samples' I have multiple .xyz file (coordinate files). I'm trying to create a function that accepts a path to one input file and not the directory. It don't want it to loop over the files, just process a single file. I want to do it without having to remove all the files except 1 in the directory path.
Any help would be much appreciated :)