Entry
Where I can find script language for the Windows, with manual (the syntax of that script language)?
Apr 12th, 2006 01:32
Richard Pond, Mirko Lukic,
Several possible answers. Here are two:
* 1) BATCH FILES (traditional, functionality limited but much greater
than sometimes thought):
Batch files can be used for scripting. Go to the command prompt (Start
Menu, Run, cmd) and type HELP. This shows you a list of available
commands. The following are all very useful:
echo
copy
del
if
goto
find
ren
sort
move
pushd
popd
cd
Type a command name followed by /? for more help on that command, e.g.
dir /?
if /?
pushd /?
set /?
Type SET for a list of environment variables. These can be referenced
in code using %variablename%, e.g. %windir%. There are also some
built-in variables like %date% on more recent Windows versions. And
your script can create its own variables using SET variablename = value.
A batch file is any file ending with the extension .bat and containing a
series of commands. Program names may also be included. Parameters may
be passed to the batch file and read as %1 (first parameter), %2 (second
parameter), etc.
Results of a command may be redirected to a text file, e.g.
dir *.exe > exe-file-list.txt
Results of a command may also be channelled via another command, e.g.
dir /b | find "m"
to display all files in the current directory which have the letter "m"
somewhere in the filename.
Multiple redirections may be used:
dir /b | find "m" > m-files.txt
* 2) VBSCRIPT / JSCRIPT:
Many Windows systems have VBScript and JScript interpreters installed.
To see if this works on your system, create a file containing the single
line
Msgbox "hello"
and save it as hello.vbs, then run it. VBScript is based on Visual
Basic. A tutorial and reference are at
http://www.w3schools.com/vbscript/default.asp