PRODUCT |

|

|
|
|

|
|
|
|
|
|
|
|
|
FAQ |
|
|

|
|
|
|
|
|
|
|
|
|
LEARN SCRIPTING |
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SAMPLE SCRIPTS |
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HELP / DOCUMENTATION |
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
Help Page - batch
( Some help pages may not display correctly in html because those help pages may have sample code in them, part of which may be mis-interpreted as html tags.
All help pages, including this help page, are available in biterScripting with the help command. )
|
|
|
System Feature
batch
Purpose
Use of the program in batch mode (also called non-interactive, command line, or console mode).
Aliases
None.
Syntax
C:/biterScripting/biterScripting.exe <script_file>
[ -i <input_file> ]
[ -o <output_file> | -oo <output_file> ]
[ -e <error_file> | -eo <error_file> ]
[
[<var_name> ( <var_value> )]
[<var_name> ( <var_value> )]
...
]
Arguments
<script_file> Name of the file that contains the script to be executed.
<input_file> Name of the file from which input is read.
<output_file> Name of the file to which output is sent.
If the -o option is used, the output is appended to the file. If the -oo option is
used, the output is written over previous contents of the file.
<error_file> Name of the file to which errors are sent.
If the -e option is used, the errors are appended to the file. If the -eo option is
used, the errors are written over previous contents of the file.
All file names can be either relative path names or full path names.
Forward variable assignment (FVA) is performed using the var_name and var_value.
See help page on script command for more details.
Stream Input
Same as script command.
Stream Output
Is not written to screen. It will go to <output_file>.
Stream Error
Any errors are listed here. Again, this stream is not written to screen.
It will go to <error_file>.
Description
biterScripting can be used in batch mode for a non-interactive operation. biterScripting can
be invoked in batch mode from your operating system's command line, or from a web server.
It can also be executed in batch mode from any other program that supports batch mode or
a program that you have developed yourself.
The script in the script_file is a collection of commands. See the help page on
script command for details.
The script_file may call other (sub-) scripts in turn using the script command. This allows
for your code to be organized in small, manageable sets of functionality.
The biterScripting executable is available in C:/biterSCripting/biterScripting.exe
Restrictions
This feature is available in WEB-SERVER VERSIONS ONLY. It is also available in Free Trial Version.
Depending on your operating system, and where you are invoking the batch mode from, you may have
to specify options and arguments inside double quotes.
Valid Examples
C:/biterScripting/biterScripting.exe "myscript.txt" -o "out.txt" -e "err.txt"
Will execute the script myscript.txt. The output will be appended to out.txt
Any errors will be appended to err.txt.
C:/biterScripting/biterScripting.exe "SS_FindStr.txt" -o "C:/out.txt" -e "C:/err.txt" dir("C:/Myproject") files("*.html") str("Copyright")
The above is an example of passing arguments to the script using FVA (Forward Variable Assignment). It uses the sample
script SS_FindStr. It will list instances of string "Copyright" in files whose names match "*.cpp" in directory "C:/Myproject".
Output will be listed in "C:/out.txt". Any errors will be listed in "C:/err.txt"
Invalid Examples
C:/biterScripting/biterScripting.exe myscript.txt
This example is not quite invalid. However, since output and errors are not redirected, they will be
lost, unless the commands in myscript.txt are redirecting their output and errors to files.
C:/biterScripting/biterScripting.exe
This instance of biterScripting is invoked without specifying a script file. An interactive
mode execution will begin instead of batch mode execution.
See Also
script
input
output
error
|
|
|
© 2008-2010, biterScripting.com. All rights reserved.
biterScripting, biterScript, biterBrowser, biterScripting.com, FVA (Forward Variable Assignment) are trademarks of biterScripting.com. Is it biterScripting-compatible ? is a service mark of biterScripting.com.
Explorer, Unix, Windows are trademarks, service marks or other forms of intellectual property of their respective owners.
|
|