Re: Is It Scripting or Not




"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


.



Relevant Pages

  • Re: cmd.exe rename of root directory fails with file not found
    ... allows for space to backup even if problems are encountered...such as this ... error came to light while debugging a command script backup procedure ... Is there a bug in cmd.exe with regard to dynamic disks ... Did you try some basic commands such ...
    (microsoft.public.windows.server.general)
  • Re: RMAN command from script
    ... > I am trying to run the RMAN backup from a script. ... > when i run it gives errors RUN, backup commands not found. ...
    (comp.databases.oracle.server)
  • Re: Windows "Scheduled Task Wizard..."
    ... The script example I gave you is ... In its simplest form a batch file consists of a ... collection of commands such as copy, delete, move, ask ... I am not finding the way to schedule one job to meet the above ...
    (microsoft.public.windows.server.general)
  • Re: Asterisk in GP login script
    ... If it worked there as both the batch and at the console, then it has to be the GPO handoff that is interfering. ... I would suggest that you change the GPO settings to show the script as it is running and put a pause in at the end of it so you can catch the error message. ... I have seen cases where commands don't work well if they try to run before the UI is fully loaded. ...
    (microsoft.public.win2000.group_policy)
  • Re: How To Execute A Sql Script File From ADO.NET Using VB.NET
    ... You will have to break up the script into it's portions. ... Then execute each set of commands within the batch. ...
    (microsoft.public.dotnet.framework.adonet)