Batch ToolKit V 1.00.A
Download Batch ToolKit V 1.00.A 56.5KB.
Becho is a replacement for the `echo` command of DOS. Becho is a very powerful program
and with proper use, one can work wonders with it.
Command Line Options
-Fxxxxxxx | Font Color. Replace <xxxxxxx> with color name. It can be any colour in the colour chart. |
-Bxxxxxxx | Background Colour. Replace <xxxxxxx> with color name. It can be any background colour in the colour chart. |
-blink | Enables Blinking mode. |
-X |
Enables eXtended mode. In this mode you can give diffrent
colours for the same line. An example is given below.
becho -x -f4 http:// -b7 -f0 \bwww. -b2 -f15 "\bboocities.com/" -b3 -f13 \bbinnyva
Result :
C:\DOS>becho -x -f4 http:// -b7 -f0 \bwww. -b2 -f15 "\bboocities.com/" -b0 -f13 \bbinnyva |
http:// |
www. |
geocites.com/ |
binnyva |
|
C:\DOS>_ |
-noblink shuts off the blinking mode aftter it is enabled.
Note : The whole command must be given in one line. |
Inline Formatting
You can use the codes given below in the strings that you give to get untypeable characters like New Line, Audible Bell etc.
Code | Does this |
\a | Sounds a bell |
\b | Backspace |
\n | New line |
\t | Tab character |
\\ | Prints a slash(\) |
Tnd Page
This command displays the time and date in the format specified at command line.
Command Line Options
-t | Shows Time in "Hours:Min AM/PM" Format |
-d | Shows Date in "D-M-Y" Format |
-dm | Shows Date in "D-M" Format |
-md | Shows Date in "M-D" Format |
-l | Display day in Long Format - 1st January 2000. |
-0 | Add 0 to the number. 1-9-2004 becomes 01-09-2004 |
-? | Displays Help screen |
-x | Allows eXtended formatting of date and time. |
| After the '-x' leave a space and type the following |
|
/d | For Day | /D | For zeros in day(1 becomes 01) |
/m | For Month | /M | For month with zeros |
/w | For small name of Weekday (Mon,Tue, etc.) |
/W | For name of Weekday (Monday,Tuesday, etc.) |
/n | For small Name of the month (Jan, Feb, etc.) |
/N | For Name of the month (January, February, etc.) |
/y | For Year | /Y | For 4 digit year(2004) |
/h | For Hour | /H | For hours with zeros |
/2 | For hours in 24 hour clock |
/e | For minutE | /E | For minutEs with zeros |
/a | For AM/PM |
/- | For putting the character '-' |
/_ | For putting a space ' ' |
/' | For putting a quotes character (") |
|
Note : The inline formatting option use '/' and not '\'.
Example
I am assuming that you use windows. If this should be done in dos some changes should be made.
1) To make a folder with today's date. Make a batch file with the below content and run it.
@echo off
becho mkdir > c:\windows\temp\tmp$~.bat
becho " \"">> c:\windows\temp\tmp$~.bat
tnd -x "/M - /D\'" >> c:\windows\temp\tmp$~.bat
echo. >> c:\windows\temp\tmp$~.bat
call c:\windows\temp\tmp$~.bat
2) Get today's date into a file. Run this command and replace "filename.ext" with the name of the file.
tnd -l >> filename.ext
3) Get the time into a file. Run this command and replace "filename.ext" with the name of the file.
tnd -t >> filename.ext
Usage : Message [OPTIONS] "<Message Text>"
Shows a message box with the text specified as the argument. This message box can be in the from of an alert - just the OK button or as a conformation box - two buttons will be shown - OK and Cancel(can be changed). Any one button can be chosen using the arrow keys and enter. If OK is selected, the errorlevel will be set to 1 and if Cancel is selected, the error level will be 0.
The text colour and background colour of all elements can be set from the command line.
All the command line options are described below.
Example: message -bg blue -t BLACK -hs "Hello World"
Command Line Options
--hide_shadow OR -hs | - Disables the drop shadow effect. |
--yesno OR -yn | - The Button text will be 'Yes' and 'No'. |
--okcancel OR -oc | - The Button text will be 'OK' and 'Cancel'. |
--delimiter <#> OR -d <#> | - Sets the delimiter at the ends of the button. <#> can be any of the following values. |
|
Code | Button Text |
0 | Text (No Delimiters) |
1 | < Text > |
2 | - Text - |
3 | [ Text ] |
4 | .: Text :. |
|
-? OR --help | Shows help screen (this screen) |
-? break | Shows help page by page. |
Example : message -yn --delimiter 4 "Hello World"
Colour Options
The all the colours can be set from the command line. The format is given below.
Note : MB - Message Box
Command Line | Function |
--border_color <colour> OR -bc <colour> | The colour of the border of the MB. |
--background <colour> OR -bg <colour> | The background colour MB. |
--text_color <colour> OR -tc <colour> | The text colour in MB. |
--button_text_color <colour> OR -btc <colour> | The text colour of the selected button. |
--button_background <colour> OR -bbg <colour> | The background colour of the selected button. |
--disabled_text_color <colour> OR -dtc <colour> | The text colour of the button that is NOT selected. |
--disabled_background <colour> OR -dbg <colour> | The background colour of the button that is NOT selected. |
--shadow_color <colour> OR -sc <colour> | The colour of the Shadow. |
<colour> can be any color specified in the Colour Chart. You can use
the code instead of the colour name. Please be careful to give
only the first 8 colors in the chart as the background color.
Usage : Select [OPTIONS] <Menu Item> <Menu Item> <Menu Item> ...
Select will show a interactive arrow-keys driven menu from which the user can make a selection. The number of the selection will be set as the errorlevel. The is useful in batch scripts.
The text colour and background colour can be set from the command line.
Note : If a item is more than one word enclose it in quotes. Like "Menu Item".
Command Line Options
--hide_info OR -hi | Hides the "Currently Selected" text. |
--show_numbers OR -sn | Shows numbers for each element in the menu. |
--no_fill OR -nf | This will cause the background to be the same width as the text. |
-? OR --help | Show help screen (this screen) |
-? break | Shows help page by page. |
Colour Options
The text colour and background colour can be set from the command line.
The format is given below.
Command Line | Function |
--back <colour> OR -b <colour> | Sets the default background colour. |
--text <colour> OR -t <colour> | Sets the default text colour. |
--select_back <colour> OR -s <colour> | Sets the background colour for selected items. |
--select_text <colour> OR -t <colour> | Sets the colour of the selected item. |
<colour> can be any color specified in the Colour chart. You can use
the code instead of the colour name. Please be careful to give
only the first 8 colors in the chart as the background colour.
Example:
select "Item 1" "Item 2" "Item 3" -b LIGHTGRAY -t BLACK -sb LIGHTGREEN -st RED
Usage : Getline <FileName> [OPTIONS] <StartLineNumber> [ - ] [<EndLineNumber>]
This command will show the contents of a file from <StartLineNumber> to
<EndLineNumber> which can be specified at command line. If <EndLineNumber>
is omitted, only line number <StartLineNumber> is is shown. If <EndLineNumber>
is end or 0 or greater than the last line number, everything from <StartLineNumber>
to end of file is shown.
Example : getline autoexec.bat 2 - end
Command Line Options
-v | Verbose Mode |
-noerror | Will not display any error. |
-? OR -h | Display the help screen. |
Colour Name | Code |
Background | Example |
BLACK | 0 | Yes | Example |
BLUE | 1 | Yes | Example |
GREEN | 2 | Yes | Example |
CYAN | 3 | Yes | Example |
RED | 4 | Yes | Example |
MAGENTA | 5 | Yes | Example |
BROWN | 6 | Yes | Example |
LIGHTGRAY | 7 | Yes | Example |
DARKGRAY | 8 | No | Example |
LIGHTBLUE | 9 | No | Example |
LIGHTGREEN | 10 | No | Example |
LIGHTCYAN | 11 | No | Example |
LIGHTRED | 12 | No | Example |
LIGHTMAGENTA | 13 | No | Example |
YELLOW | 14 | No | Example |
WHITE | 15 | No | Example |