The problem with this is that $d gives you the entire directory path (minus the device). So, your choice is between no directory information, or the entire dir path.
What people with multiple projects would want is JUST THE LAST FOLDER of the directory path (the actual project folder). That is, the folder containing the file, as well as the file.
So what is needed is a way to substring the $d value.
I tried "$d" (to start with the 74th character). Put it just appended "" to the path string. Not terribly useful.
Maybe some brilliant soul can figure out how to substring $d string. THEN this would really be useful!