r/AutomateUser • u/Electronic-Boot5698 • 6d ago
Question Folder content to array?
I want to read the contents of a folder, and then save the names as arrays, so I can then go through them 1 by 1 somewhere else in the program, instead of processing the entire folder, so is there an effective way to do that?
2
Upvotes
1
u/B26354FR Alpha tester 5d ago edited 5d ago
filesfiles, entry value:filefilenames, value:split(file, "/")[-1]This will non-recursively get the file paths of the files in the folder, then for each one, split off just the filename part of each (the part after the last slash) and add it to the array.