View Single Post
  #11  
Old March 30th 05, 02:52 PM
Pegasus \(MVP\)
external usenet poster
 
Posts: n/a
Default


"Piotr" wrote in message
...
Why not manual???


Because batch file language is not a nice and tightly defined
programming language. It's full of little and unexpected
surprises, and as many frustrations and disappointments.


But since Microsoft is still making changes to it maybe there is a future


Why do I have to use VBS just to make some backups, compress some files

and
so on. I'm using batches for 15 years and I like them ))

Piotr


I did not say that you have to use VBS. I only replied
to your question about the documentation for this
particular syntax. There isn't any, and I don't think
there will ever be. If you wish to do something special
in a batch file, try it. If it works - great!, but don't expect
it to be as robust as in a programming language. I don't
think, for example, that anyone has ever tried to explain
why the "call" command is necessary in the following sample
code, and why it works, but it does!

@echo off
set variable=abcdefg
set string1=cde
set string2=xyz
call set variable=%%variable:%string1%=%string2%%%
echo Var=%variable%

Now consider how string substitution is done in a
programming language, then shake your head in amazement
about this extraordinary piece of code.


Ads