J jayawant Member Joined Apr 25, 2011 Messages 21 Programming Experience 1-3 Jan 24, 2012 #1 hi All, how to get the current windows explorer path in vb.net windows application?. Thanks,
JohnH VB.NET Forum Moderator Staff member Joined Dec 17, 2005 Messages 15,799 Location Norway Programming Experience 10+ Jan 24, 2012 #2 There can be many explorers showing different paths, maybe you mean this: My.Computer.FileSystem.CurrentDirectory Property Windows Explorer paths are also available though, see post 2 here: http://www.vbdotnetforums.com/vb-net-general-discussion/10678-how-detect-if-file-manager-open.html Path there is .LocationURL, here's a quick code addition sample to work with that: Dim u As New Uri(ies.LocationURL) If u.IsFile Then Debug.WriteLine(u.LocalPath) End If Upvote 0 Downvote
There can be many explorers showing different paths, maybe you mean this: My.Computer.FileSystem.CurrentDirectory Property Windows Explorer paths are also available though, see post 2 here: http://www.vbdotnetforums.com/vb-net-general-discussion/10678-how-detect-if-file-manager-open.html Path there is .LocationURL, here's a quick code addition sample to work with that: Dim u As New Uri(ies.LocationURL) If u.IsFile Then Debug.WriteLine(u.LocalPath) End If