Advanced apologize for my complete lack of knowledge here, I’ve been working through this with google and crtl-c crtl-v.
I have a small script to watch a folder for 3dm files and output the filenames to another grasshopper component, how can I sort the list of files either numerically or alphabetically.
this is what I have so far to watch the folder.
import os for root, dirs, files in os.walk(y): for file in files: if file.endswith(".3dm"): print(os.path.splitext(file))
I’m assuming I need to use sort() to get the result I want but don’t know how to actually apply it here.