Create a new view scheme
Add 2 view items
- [Year]
- and a new expression called "Last Folder" (or whatever you want)
The "Last Folder" expression item should contain the following ...
ListItem([Filename (path)],ListCount(RemoveLeft([FileName (path)],3),\),\)
What this does is (working from the inside out)
1) removes the volume from the filepath i.e. "z:\Photos\Folder1\Description" yields "Photos\Folder1\Description" - we need to do this as listitem(listcount) returns the n
th as opposed to the (n-1)
th item in the list count (see next)
2) counts how many "list items" (i.e. folders) are left in the path. (it looks for items delimited by the "\" character)
3) returns the last of the items (the last folder) in the file path
It's kinda clunky as we can't use arithmetic to do listcount-1 (at least not that I know of). You'll also want to be careful with UNC based paths (e.g. \\server\share\path\to\photos\) as this will NOT work for that, but a simple conditional statement can be written to catch and accomodate that.
C.