Copy link to clipboard
Copied
I have a directory of images consecutively numbered.
Is there a way to get the current higest filename - I had been thinking cfdirectory sorted by filename descending limited to 1 result but I don't think cfdirectory allows for that.
Mi-ul
Copy link to clipboard
Copied
CFDirectory returns a query. Once you have that, you can use CF's Query-of-a-Query functionality to order and retrieve the data to your hearts content.
Copy link to clipboard
Copied
I was hoping to do it in the original function as there are lots of files and it takes a while to run the original query
Copy link to clipboard
Copied
The original function, as you describe it, is cfdirectory. You only have to do it once. A Q of Q on the resulting query should be pretty quick, unless you have millions of files to deal with.