0
Process.Start(Path.GetDirectoryName(xsM))

xsM = String with a FullPath of a .File.

.i would like to load win.explorer with that.File.Selected=True .

.thanx.in.advance.

2
Contributors
2
Replies
8
Views
5 Years
Discussion Span
Last Post by codeorder
0

Here is what you might be looking for:

Dim filePath As String = "C:\Users\%USERNAME%\Documents\test.txt" 'Example file
Process.Start("explorer.exe", "/select," & filePath) 'Starts explorer.exe and selects desired file
Votes + Comments
"just.because" :D
0

Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "\test.txt" 'Example file seems to work a little better than "C:\Users\%USERNAME%\Documents\test.txt" ; += thanks. :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.