check path local or network ?

Hey guys, is there a way to determine if a path is local or from a network computer ?


By the way… I need to get this info on a windows only app…

For Windows you can use the PathIsNetworkPath function:

Declare Function PathIsNetworkPathW Lib "Shlwapi" (Path As WString) As Boolean If PathIsNetworkPathW(MyFolderItem.AbsolutePath) = True Then MsgBox("Network") Else MsgBox("Local") End If

While this will mostly work it fails in some neat circumstances unfortunately

Paths that begin with a letter followed by a colon (:slight_smile: are interpreted as a mounted network drive. However, PathIsNetworkPath cannot recognize a network drive mapped to a drive letter through the Microsoft MS-DOS SUBST command or the DefineDosDevice function.

I see… well … I don’t see any better alternative to identify a folderitem located not in the local machine… :frowning:

Just so you know that it can fail for certain reasons
Better than being surprised about this failure condition

Thanks Norman… by the way… This warning (using MS-DOS SUBST command) is also valid when using “connect to network unit” with windows file explorer ?

Its been a while since I had to use this so I dont recall but I dont believe it gets that one wrong