Grabbing only the most recent filename using Dir?

hey all -

trying to use Dir to grab only the newest (sorted by creation date) filename in a directory that is fairly constantly being updated with new files…

the only way I can think of doing it is:

  • to take the string output of Dir,
  • save it in a S+H,
  • update the Dir again and somehow SUBTRACT the earlier version saved in the S+H from Dir output spread…

the resulting string will be the new file!

but,

how do you do that subtraction?

or is there a better way?

thanks guys 8D

I think ModificationDate (File) should help.

Hmmm, I’m not sure how to sort the output of Dir using the data from ModificationDate. What node should I be using?

(The Sort node can arrange the ModificationDate data by numerical value, and I can use CDR to get the greatest value, but how do I use THAT data to figure out which slice from DIR to grab?)

you can use CDR also on the Former Slice-pin of the Sort and use GetSlice on the Dir

little patch from newb to newb. greets

find_new_file.v4p (4.8 kB)