Tim Williams used his keyboard to write :
If I map a local drive Z to \\someserver\somefolder I can do this:
Debug.Print Dir("Z:\")
or this:
Debug.Print Dir("\\someserver\somefolder\")
and I get the same result. Maybe we're talking at cross-purposes here
- do you have an example which doesn't work like this?
We might very well not be on the same page here!
I was thinking of the situation where I was using a Windows Explorer
FolderView method to return a path and whenever I selected a 'mapped'
*folder* it returned the redirect folder rather than the absolute path.
I'm sure you are correct about a local drive as explained, and so we
are not on the same page regarding 'mapped' network folders (not as a
local drive) as represented in Windows Explorer's folderview list under
'My Network Places'. IIRC, these folders are 'namespaces' that the
system redirects via a '.lnk' to the absolute path. We can't use the
value returned by the namespace as a valid path. The term that applies
here is 'AbsolutePIDL' as pertains to Windows file system. There's no
easy way to get the target of the link without jumping through several
API hoops to get there.
I opted to use a 3rd party OCX replacement for WE that promised all
kinds of customization. Awesome tool but duplicated what WE did to a
'tee'! When I explained the problem to the author of the FolderView.ocx
he understood exactly what I meant but stated that his ocx duplicates
what Windows Explorer does. I replied that this is exactly why I was
using his control since it was advertised as being identical to WE
*'plus'* fully customizeable. Since this was used in a proprietary file
manager app, he was gracious enough to upgrade the ocx by adding an
additional method to always return an AbsolutePIDL to an additional
'AbsolutePath' property so I could access it more easily. This allowed
me to continue using the ocx with my project. What was interesting is
that both WE Fileview and his Fileview.ocx displayed the actual folder
contents which, I suspect, is because his tool did in fact duplicate WE
in 'out-of-the-box' configuration. Explains why/how he knew exactly
what to do to give me what I was looking for.