Home All Groups Group Topic Archive Search About

need clarification from M S Herfried K. Wagner

Author
5 Apr 2005 1:37 PM
raulavi
on a msg on 2/20/05 8:16 am pst you state (talking about arguments)
>>Depending on the application, certain parameter values need to be put
between double quotes, for example, file names containing space characters.
Maybe this is causing your problem.<<

I need to know when to use 2 double quotes?

.... is it different when you have arguments ...lets say:

1.-  Process.Start("notepad", " ""C:\Bla Bla\1.txt""  ""/p Y""     " )

2.- proc.arguments = how?  

thanks

--

Author
5 Apr 2005 1:53 PM
Cor Ligthert
Raulavi,

A pity that the Microsoft guy Herfried K. Wagner can only give an answer on
this question probably everybody knows its answer.

Cor
Author
5 Apr 2005 2:05 PM
raulavi
You may as well...thanks.

Show quoteHide quote
"Cor Ligthert" wrote:

> Raulavi,
>
> A pity that the Microsoft guy Herfried K. Wagner can only give an answer on
> this question probably everybody knows its answer.
>
> Cor
>
>
>
Author
5 Apr 2005 2:05 PM
raulavi
and it is....

(no it is just that he had the statement about quotes on prev msg)

Show quoteHide quote
"Cor Ligthert" wrote:

> Raulavi,
>
> A pity that the Microsoft guy Herfried K. Wagner can only give an answer on
> this question probably everybody knows its answer.
>
> Cor
>
>
>
Author
5 Apr 2005 2:34 PM
Cor Ligthert
Raulavi,

A double quote in every VB language is used to set a single quote in a
string.

Here is a more complete about sample about what you ask.

\\\
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.Arguments = """C:\Windows\Win.Ini"" ""/p"" ""Y"""
pi.FileName = "notepad.exe"
p.StartInfo = pi
p.Start()
///

Although I absolutly don't know what those parameters mean,

Cor
Author
5 Apr 2005 2:55 PM
raulavi
Thanks...for the clarification, I wanted to be sure I did not miss something.
First, let me thanks each one of you that has replied to my msgs.

(then, Yeap I know that issue about VB dblequotes)
  I found what was going with all these arguments passing...got carry out.
Very sorry about it.
  the problem was not on arguments but, on one of my routines ( did some cut
and paste and you know the rest).

I thought that it was something special about running console exes and
arguments passing. I think I know how now.
  But, you all did help me to find out what was wrong.

  Thanks






Show quoteHide quote
"raulavi" wrote:

> on a msg on 2/20/05 8:16 am pst you state (talking about arguments)
> >>Depending on the application, certain parameter values need to be put
> between double quotes, for example, file names containing space characters.
> Maybe this is causing your problem.<<
>
> I need to know when to use 2 double quotes?
>
> ... is it different when you have arguments ...lets say:
>
> 1.-  Process.Start("notepad", " ""C:\Bla Bla\1.txt""  ""/p Y""     " )
>
> 2.- proc.arguments = how?  
>
> thanks
>
> --
>
Author
5 Apr 2005 3:46 PM
Herfried K. Wagner [MVP]
"raulavi" <raul***@discussions.microsoft.com> schrieb:

First, please do not mention my name in a subject's title and stay in the
original thread.

> on a msg on 2/20/05 8:16 am pst you state (talking about arguments)
>>>Depending on the application, certain parameter values need to be put
> between double quotes, for example, file names containing space
> characters.
> Maybe this is causing your problem.<<
>
> I need to know when to use 2 double quotes?
>
> ... is it different when you have arguments ...lets say:
>
> 1.-  Process.Start("notepad", " ""C:\Bla Bla\1.txt""  ""/p Y""     " )
>
> 2.- proc.arguments = how?

Double quotes are typically used to remove ambiguity when dealing with paths
containing spaces.  Consider an application that accepts two paths as
command-line arguments and these paths contain spaces -- in this case it
would be hard to separate the two paths from each other.  However, not all
applications understand double quoted paths at all, especially some other
tools ported from DOS/Win16 may recognize paths in 8.3 format without spaces
only.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
5 Apr 2005 3:50 PM
Herfried K. Wagner [MVP]
Addendum:

Sorry, it seems that I misread your post.  Two consecutive double quotes are
used inside string literals to encode single double quote characters.  In
other words, each sequence of two double quotes which is embedded into a
string literal will be interpreted as a single double quote.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>