文件路径中的空格 [英] spaces in file paths
问题描述
以下不起作用:
Dim photoPath As String =" R:\ My Documents \ MyYy Pictures\MiscLL \"
如果我使用双引号也不行。如果我使用不含空格的
不同路径,它确实有效。什么是简单的解决方案?
-
使用Opera革命性的电子邮件客户端: http://www.opera.com/mail/
The following doesn''t work:
Dim photoPath As String = "R:\My Documents\My Pictures\MiscLL\"
It doesn''t work if I use double quotes either. It does work if I use a
different path without spaces in it. What is the simple solution ?
--
Using Opera''s revolutionary e-mail client: http://www.opera.com/mail/
推荐答案
连接它周围的双引号:
Dim photoPath As String = chr(34)+" R:\ My Documents \ MyYy Pictures\MiscLL \ " +
chr(34)
-
HTH
$ b $béricMoreau,MCSD,Visual开发人员 - Visual Basic MVP
Conseiller首席/高级顾问
S2i web inc。 ( www.s2i.com )
http://emoreau.s2i.com/
DesCF < de *** @ aol.com在消息新闻中写道:op.tkplbpvrupgxg0@descstar ...
以下不起作用:
Dim photoPath As String =" R:\ My Documents \ My Pictures \ MiscLL \"
如果我使用双引号也不行。如果我使用不含空格的
不同路径,它确实有效。什么是简单的解决方案?
-
使用Opera革命性的电子邮件客户端: http://www.opera.com/mail/
concatenate double quotes around it:
Dim photoPath As String = chr(34) + "R:\My Documents\My Pictures\MiscLL\" +
chr(34)
--
HTH
éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
S2i web inc. (www.s2i.com)
http://emoreau.s2i.com/
"DesCF" <de***@aol.comwrote in message news:op.tkplbpvrupgxg0@descstar...
The following doesn''t work:
Dim photoPath As String = "R:\My Documents\My Pictures\MiscLL\"
It doesn''t work if I use double quotes either. It does work if I use a
different path without spaces in it. What is the simple solution ?
--
Using Opera''s revolutionary e-mail client: http://www.opera.com/mail/
I如果那不起作用,我会感到震惊。它没有将该字符串分配给
photoPath变量?
DesCF < de *** @ aol.com在消息新闻中写道:op.tkplbpvrupgxg0@descstar ...
以下不起作用:
Dim photoPath As String =" R:\ My Documents \ My Pictures \ MiscLL \"
如果我使用双引号也不行。如果我使用不含空格的
不同路径,它确实有效。什么是简单的解决方案?
-
使用Opera革命性的电子邮件客户端: http://www.opera.com/mail/
I''d be shocked if that didn''t work. It doesn''t assign that string to the
photoPath variable?
"DesCF" <de***@aol.comwrote in message news:op.tkplbpvrupgxg0@descstar...
The following doesn''t work:
Dim photoPath As String = "R:\My Documents\My Pictures\MiscLL\"
It doesn''t work if I use double quotes either. It does work if I use a
different path without spaces in it. What is the simple solution ?
--
Using Opera''s revolutionary e-mail client: http://www.opera.com/mail/
" ; DesCF" < de *** @ aol.comschrieb:
"DesCF" <de***@aol.comschrieb:
>以下不起作用:
Dim photoPath As String = R:\ My Documents \ MyYy Pictures\MiscLL \
如果我使用双引号也行不通。如果我使用不含空格的不同路径,它确实有效。什么是简单的解决方案?
>The following doesn''t work:
Dim photoPath As String = "R:\My Documents\My Pictures\MiscLL\"
It doesn''t work if I use double quotes either. It does work if I use a
different path without spaces in it. What is the simple solution ?
什么不起作用?!
-
MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://dotnet.mvps.org/dotnet/faqs />
What does not work?!
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
这篇关于文件路径中的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!