Re: Re: How to read value of a variable being set in a batch file?
- From: "asdf" <asdf@xxxxxxxx>
- Date: Sun, 22 Oct 2006 05:48:00 -0400
You will be the one, I presume, favoring a "commercial" to a website
in plain Schulman text, reposting question to the
end of a question, thereby having the reader in limbo tho the essence.
-------------------------------------
With your a so value to this group, your tips are far from vital nor
essential.
"Jerold Schulman" <Jerry@xxxxxxxxxx> wrote in message
news:ctccj2l8151qr5amjpebe6cqfr30oni9u0@xxxxxxxxxx
On 18 Oct 2006 06:39:02 -0700, stembe@xxxxxxxxx wrote:generated from a CMD command or batch?
Thanks everyone for their suggestions so far....From what I can tell, ISee tip 10922 » How can a Vbscript process each line in the STDOUT
have 3 options:
1). Write the value to a temp file & then read the temp file (and
delete it) - Doable, but seems inefficient to me.
2). Read value of the environment variable - This will only work if I
set VAR1 as a permanent system variable along with PATH, TEMP, etc.;
and as Tom has mentioned setting VAR1 in the batch script will not work
since it will not be "exported" to the parent process.
3). Echo the variable in my batch script & then use StdOut.Readall to
read it into a string -- This works, but I noticed that the string
contains trailing special characters and I can't seem to figure out
what they are. They look like spaces or blanks, but are not, because
when I try to strip off spaces from the string, it does not work (the
"length" of the string stays the same, even though the actual number of
characters displayed or visible is less). Not sure if they are tabs or
something else.
Is there a way to find out & strip off any special characters from a
string in my scenario?
Thanks,
S
in the 'Tips & Tricks' at http://www.jsifaq.com to read each lineindividually.
Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
.
- References:
- How to read value of a variable being set in a batch file?
- From: stembe
- Re: How to read value of a variable being set in a batch file?
- From: Jerold Schulman
- Re: How to read value of a variable being set in a batch file?
- From: stembe
- Re: Re: How to read value of a variable being set in a batch file?
- From: Jerold Schulman
- How to read value of a variable being set in a batch file?
- Prev by Date: Re: newbie wanting to write a script
- Next by Date: Re: how to run a bat file in remote PC through ASP
- Previous by thread: Re: Re: How to read value of a variable being set in a batch file?
- Next by thread: Re: How to read value of a variable being set in a batch file?
- Index(es):
Relevant Pages
|