Re: Is It Scripting or Not
- From: "Al Dunbar" <AlanNOSPAmDrub@xxxxxxxxxxx>
- Date: Fri, 16 Dec 2005 18:34:58 -0800
"TonyJ" <ajocius@xxxxxxxxxxxxx> wrote in message
news:gbKof.651598$xm3.565543@xxxxxxxxxxxx
> Group,
> I'm new to scripting although I use DOS commands to backup my work and
> computers at home. Recently I was told I could do the same as I do from
> the command prompt in windows. I'm considering VB Script.
Many tasks that can be done using batch scripts or directly from the command
prompt can be done in VBScript and vice versa. I use both, and see no
particular reason to convert completely to one or the other.
Which one chooses for a particular task depends on a number of factors. If I
need something done quickly that is probably a one-time thing, I tend to use
batch, *unless* some sophisticated data management or logic is required.
This includes things like simple file manipulation, and/or tasks which can
reasonably be carried out with a series of batch commands.
> From the items below, is VB Script the tool I should be using?
> a. run backup batch file for computer backups
If it is just a batch file, why not just run it? Or schedule it to be run
periodically?
> b. Ask registry about version information
Version information about what? And once the question asked is answered,
what will the script do with that information, just display it, or apply an
update? Registry tools are available for batch use, but this is built-in
with vbscript.
> c. Parse text files
VBScript has much more sophisticated facilities for string manipulation,
however, it kind of depends on how complex this "parsing" is. If the text
includes characters that are special to the command shell ("<|>/&" and etc.)
parsing in batch can get fairly tricky.
In summary, you are probably in the best position to determine if your batch
skills are equal to all the tasks you are expecting to be faced with, or if
you need other options to be fully functional in your environment. I suspect
it would be well worth your time to at least begin to investigate VBScript
to see if it will make some of the tasks simpler or, in some cases, possible
to carry out.
/Al
.
- Follow-Ups:
- Re: Is It Scripting or Not
- From: TonyJ
- Re: Is It Scripting or Not
- References:
- Is It Scripting or Not
- From: TonyJ
- Is It Scripting or Not
- Prev by Date: Re: Is It Scripting or Not
- Next by Date: Re: Is It Scripting or Not
- Previous by thread: Re: Is It Scripting or Not
- Next by thread: Re: Is It Scripting or Not
- Index(es):
Relevant Pages
|