Search code examples
kdb

Get the latest date folder


I have many date folders under path:/var/tmp/

2018.07.04
2018.07.05
2018.07.06
2018.07.07
2018.07.08
2018.07.09

And I want to get latest date folder[ 2018.07.09] from above folders.how should i do?


Solution

  • You can try this if the folders are in chronological older:

    -1#(!:)hsym`$"/var/tmp"