File names with commas and process.start in VB.NET

Hello,

I have a question about the file names and paths with commas inside the string.

I am trying to open the windows explorer with one file selected, in order to do this I am using

Process.Start("Explorer.exe", "/n,/e,/select," & path & filename)

The instruction does not work if path is some like

"e:\bio\Lastname, name\a\" and/or file name contains commas like:

"1800, first year.zip"

Can someone help me with the answer to this question?

Thanks in advance.
[534 byte] By [acmdo] at [2007-11-20 10:53:24]
# 1 Re: File names with commas and process.start in VB.NET
try to put double-quotes around the filename...

Process.Start("Explorer.exe", "/n,/e,/select, """ & path & filename & """")
Thread1 at 2007-11-10 3:08:28 >
# 2 Re: File names with commas and process.start in VB.NET
That will definitely work :thumb:
Also have a look here, to see what else you could do with explorer.exe :
http://www.dev-archive.com/vb/gen/vb_system/win32/article.php/c13987__1/
HanneSThEGreaT at 2007-11-10 3:09:28 >
# 3 Re: File names with commas and process.start in VB.NET
Thanks a lot for your help. It works fine.

And the link is very interesting, it can get the things easy for me.

Again, thank both of you, it was great help!
acmdo at 2007-11-10 3:10:32 >