Thanks,
Alex.
No.
There are many undocumented techniques and nobdy has written anything to parse a script for typing errors.
I doubt anyone would try as there are just too many variables and ways you can form a script, with any program and syntax.
--
Regards,
Mic
No.
Knowing what you need to do might get you some better answers.
--
Regards,
Mic
The Pause/Break key usually will pause a batch in process. Pressing the
enter/return key resumes processing. However, if Alex wants to set up break
points in the batch, the PAUSE command can be inserted in the code at
various junctures for testing purposes.
> The Pause/Break key usually will pause a batch in process. Pressing the
> enter/return key resumes processing. However, if Alex wants to set up
> break points in the batch, the PAUSE command can be inserted in the code
> at various junctures for testing purposes.
There are some simple examples in
108} How can I execute a script one line at a time to debug it?
http://www.netikka.net/tsneti/info/tscmd108.htm
for Alex to look at, in case he has not already done so.
All the best, Timo
--
Prof. Timo Salmi mailto:t...@uwasa.fi ftp & http://garbo.uwasa.fi/
Home page: http://www.uwasa.fi/laskentatoimi/henkilokunta/salmitimo/
Department of Accounting and Finance, University of Vaasa, Finland
Timo's FAQ materials at http://lipas.uwasa.fi/~ts/http/tsfaq.html
Beware the fail-to-fail scenario.
Batch is interpreted, logical-line to logical-line. As part of that
interpretation, the values of environment variables may be substituted into
the code. In essence, it's an exercise in self-modifying code.
For instance, as a single line
%var%
is perfectly valid batch syntax. Whether or not it is valid depends entirely
on the contents of the environment variable VAR. You could test for months
and get no problems using a PAUSE, but all you need is the wind blowing in
the wrong direction to make it fail.
And for those who scorn batch and look and point and titter - guess what
happens when you have your favourite compiled HLL construct an SQL query and
execute it.
So you can check your batch script under *those* operating systems, using ;
command.com /y /c mybatch.bat [parameters]
...where [mybatch.bat] is your batch file and [parameters] is any thing
else on the command-line you want to pass on to your batch-file.
This results in [command.com] "stepping" through your batch-script,
executing it line-by-line with the option of answering [Y] or [N] to
whether you execute each line.
This option is, of course, limited to the above mentioned OSes, and *not*
under any of the NT-based DOS emulation command-interpreters [cmd.exe] or
even NT-based [command.com].
==
Cheers, Tim Meddick, Peckham, London. :-)
"Alex Stankevich" <astan...@gmail.com> wrote in message
news:4d7d5ed7-d125-488d...@fq4g2000vbb.googlegroups.com...
Since this is covered in Timo's weekly batch FAQ, and OP specifically stated
CMD.EXE, it was pointless to post this as a response to the OP's message. If
you really want to be of help to the general public, you might begin with
following accepted Netiquette practices as discussed here...
http://lipas.uwasa.fi/~ts/http/quote.html
I have never heard of a existing syntax checker, it would be neat
to find one & a syntax could be written & it would be pretty much
a spell checker, there are open source spell checkers out there but
another way it could be done is to use a spell checker on properly
working batch files & add the text that is found in the batch files
to the database of the spell checker.
No, it goes here.
[Type your reply here]
>"Todd Vargo" <tlv...@sbcglobal.netz> wrote:
>No, it goes here.
>[Type your reply here]
I could swear thats what Farrah Fawcett said...
>[Type your reply here]
Dang, I know I'm tired, it looks like I forgot hot to post.
Shoot, I have been a little depressed, I no longer have my
free web space, I will try to get everything back online
including my Bat2Bash online converter, I had a Heart Attack
so I have not been able to do as much as normal but I'm okay
and should be able to get back to normal after some time...
Since you never ever approve, encourage or support anything I have ever
written, I cannot take such prejudicial criticism as a true reflection on
reality, since others are, at least, a little more "balanced" in their
analysis...
==
Cheers, Tim Meddick, Peckham, London. :-)
"Todd Vargo" <tlv...@sbcglobal.netz> wrote in message
news:ivnigt$n9j$1...@news.albasani.net...
Tim,
You 'arrived' here and immediately got on the wrong side of people
because you don't follow the conventions of the group, and Usenet,
and were argumentative about it.
Somehow you expect to gain respect in this way from the regulars?
You've said several times that people don't comment on your
posts - well you have had more posts commenting about your posts
than anyone here. The fact that they all ask you to follow the
conventions should tell you something.
--
Regards,
Mic
The amusing irony here is that he who earned a place in more than one
killfile by wantonly flouting group convention now appears to be
complaining that others are not replying, defying social convention.
>Since you never ever approve, encourage or support anything I have ever
>written, I cannot take such prejudicial criticism as a true reflection on
>reality, since others are, at least, a little more "balanced" in their
>analysis...
What?, you think it's just you he does that to, it's normal for Todd
to post something rude like that, he has done it to me & I have even
tried to find online where he live he got me so pissed off before!
Hmm, what are the odds "Guess Who..." is actually Tim?
.....and, if you're half the "expert" you seem to think you are, surely you
*know* if I'm also posting in another name - or do you think I actually
bother to run round to my local Internet Cafe in order to create my
alternative identity?!....
But seriously, I really do not feel as if I have to pose as anyone other
than myself to create artificial affirmations.
Poor ol' "Guess Who..." - according to you, he doesn't even exist!
==
Cheers, Tim Meddick, Peckham, London. :-)
"Todd Vargo" <tlv...@sbcglobal.netz> wrote in message
news:j0d6kc$2eu$1...@dont-email.me...
I've never seen one. The closest I'm aware of to something like that is
the full version of JPSoftware's Take Command product, which is a
Windows GUI outgrowth of the older 4DOS shareware command.com
replacement for MS-DOS. The full version includes an IDE and debugger
for batch files. Since one of the things 4DOS/Take Command offers is a
vastly expanded batch language, that can be useful. I suppose it could
be used to debug NT batch files, since the TCC language is a superset,
and TCC should execute standard NT batch files the way CMD would.
See http://jpsoft.com/ for information.
When I'm doing development, I make sure echo is turned on, and replace
the actual lines that will perform actions with echo statements that
simply print the line to the console. I also do things like echo the
value variables are set to. The basic technique is similar to what you
do debugging shell scripts in *nix.
You could probably write a batch file syntax checker using something
like perl that could be used like lint to make sure syntax was correct,
but it would not be able to confirm that the batch file actually did
what you intended. :-)
> Thanks,
> Alex.
______
Dennis