Yeah, but you still need to read and semi-understand what the UDF wants for parameters

The KiXform Chris wrote needs no modification or input that I recall. Just run it, browse and copy the path anywhere you're at.

However, your UDF does work as well so that gives at least two methods to retrieve back the correct path.