VSBUTIL - vit$oft batch utilities

Česká verze

This is a collection of command-line driven utilities for batch files. Run each utility with /? parameter to get this help.
All programs in this bundle are vit$oft freeware and may be used free of charge by anyone anywhere.


CMPFILE.COM

Program : CmpFile ver. 1.01 Function : Binary compare two files. Syntax : CMPfile file1 file2 (wildcards are not allowed) Errorlevel: 0 .. files are identical 4 .. files are different 8 .. file1 not found 12 .. file2 not found 16 .. not enough memory

CMPTIME.EXE

Program: CMPTIME.EXE ver.2.01 freeware 2007 by vit$oft Format: Dual DOS/Windows console utility for batch scripts. Function: Compare timestamps | Test if file is older than of two files. | specified time interval. | Syntax: CMPTIME File1 File2 | CMPTIME File /TimeInterval Wildcards not supported. | TimeInterval is decadic number | immediately followed with sec/min/hour/day | time unit specification (can be abbreviated). Errlevel: | 0...File1 is newer | 0...File is not that old 2...timestamps are equal | 4...File1 is older | 4...File is older 8...File1 not found | 8...File not found 10...File2 not found | 12...syntax error | 12...syntax error Example: | CMPTIME %1.COM %1.ASM | CMPTIME "\\Srv\Arch\Daily Backup.LOG" /24h >NUL IF ERRORLEVEL 1 GOTO :ASM | IF ERRORLEVEL 1 GOTO :DailyBackup

DISKFULL.EXE

Program : DISKFULL ver. 1.00 Dual DOS/Win32 console application Function : get occupied disk space in percents. Syntax : DISKFULL path Example : DISKFULL G: DISKFULL \\Server\Share\ ErrorLevel: 0..100 disk space occupation in % 200 path not found

MBC.COM

Program : MBC ver 2.20 Function : Read/write master-boot sector, boot sector of hard disk and CMOS content to/from a disk file. MBC does not work under Windows NT. Syntax : MBC MASTERx TO file or MBC MASTERx FROM file MBC BOOTx TO file or MBC BOOTx FROM file MBC CMOS TO file or MBC CMOS FROM file MBC MASTERx ERASE PARTITIONS (x is drive number 0..3 and may be omitted if 0) Errorlevel: 0 ... success 4 ... read or write error Warning : Unconcerned usage of this utility with FROM parameter may cause data on your hard disks be not accessible! No warning is displayed before overwriting boot sectors. The "MASTER ERASE PARTITIONS" option restores master boot sector the same way as FDISK /MBR but partitions are also erased. Parameters must be in upper case. Floppy disks are not supported. 128 bytes of CMOS is read to file but the first 16 bytes (clock) is never written back to CMOS. Checksum is not checked. Examples :MBC BOOT TO A:\oldboot.sec ; read boot sector C: and write it on A: MBC MASTER1 FROM a:\master.sec ; overwrite master boot sector on the second hard disk (INT 13h DL=81h)

MD5.EXE

Program : MD5 ver.1.00 freeware 2004 by vit$oft Format : Win32 console utility. Function : Compute RFC1321 MD5 hash from a file content. Syntax : MD5.EXE /U /L /N "a file name" Parameters: /L ... use lower case for hash output. /U ... use upper case for hash output (default). /N ... do not write CR+LF after hash output. Errorlevel: 0 ... MD5 hash computed OK 4 ... could not read the file 8 ... file not found 12 ... other error Examples : MD5 %WINDIR%\Media\tada.wav FOR /F %* ('MD5 "\\Server\Share\File.ext"') DO SET HASH=%*

MSGBOX.EXE

Program : MsgBox ver. 2.00 Dual DOS/Windows utility Function : Display a message from command line in a box, wait until Enter or Space is pressed. Syntax : MsgBox a message

OUTTIME.EXE

Program: OutTime [pattern] ver. 4.00 (c) 1994-2007 freeware by vit$oft Format: Dual Dos/Windows console utility for batch scripts. Function: Output current date and time formated by pattern. Patterns are searched for in cmd-line parameters in the order specified below and the leftmost occurence of a pattern is replaced with current local system date and time. Characters not recognized as pattern are copied verbatim. CR+LF is output only if tilde ~ is the last character in pattern. Default pattern is dd/MM/yy hh.mm.ss ErrLevel: the last replaced value in the order below (Mon=1,..Sun=7 etc.) Patterns: Wyyyyn . 4+2digit year and week in year (200701) yyyy ... 4digit year (e.g. 2002) yy ... 2digit year within current century (00..99) MM ... 2digit month (01..12) Mmm ... 3letters month (Jan..Dec) dd ... 2digit day in month (01..31) Nnn ... 3digit day in year (001..366) Wn ... 2digit week in year (01..53) DayOfWeek 9letter day of week (Monday..Sunday) JmDne_# 7letter Czech day of week (pondeli..nedele) where #=codepage (A/I/W/K/L for ASCII/ISO/Win/Kam/Lat) Www ... 3letter day of week (Mon..Sun) Ww ... 2letter day of week (Mo..Su) hh ... 2digit hour (00..23) mm ... 2digit minute (00..59) ss ... 2digit second (00..59) cc ... 2digit centisecond (00..99) Examples: OUTTIME Www, Mmm dd, yyyy hh:mm Job started~>> MyLog.TXT FOR /F %%w IN ('OUTTIME.EXE Wn') DO SET WEEKNR=%%w

REBOOT.COM

Program : REBOOT ver. 1.01 Function : Cold or warm reboot with cancellable countdown (DOS only). Parameters: /W .. warm reboot /C .. cold reboot /Gn .. grace n seconds to cancel /? /H .. this help Default is /W /G5

REPLCHAR.EXE

Program : ReplChar ver. 1.10 Function: Copy standard input to output and replace/remove specified characters (max. 128 different replacements in one run). Syntax : ReplChar /xx ... remove characters xx (hexadecimal ASCII code) ReplChar /xxyy ... replace characters xx with yy Example : TYPE InpFile | ReplChar /1A /1B20 /00 >OutFile Characters 00 and 1A (EOF) will be dropped from the output and all 1B (ESC) will be replaced with spaces.

SLEEP.EXE

Program : SLEEP ver. 1.00 Dual DOS/Windows console application. Function: Execution is paused until a key is pressed or until specified time interval has elapsed. Syntax : SLEEP seconds Example : SLEEP 30

REVERSE.EXE

Program: Reverse.exe (c) 2005 vit$oft Format: Win32 console application Function: Reverse letters in each word. Syntax: Reverse input.txt output.txt

STOPKY.COM

Program : STOPKY version 2.50 Function : Time measurement in BATch files. Granularity: 54.93 ms Range : 0.1s ... 3600s (max. 1 hour) Syntax : STOPKY START [identification remark] STOPKY STOP [identification remark] Example : REM Sample batch demonstrating the usage of STOPKY SMARTDRV /Reset >NUL STOPKY START ARJ compression >>STOPKY.LOG ARJ a SAMPLE.ARJ SAMPLE.TXT STOPKY STOP >>STOPKY.LOG SMARTDRV /Reset >NUL STOPKY START RAR compression >>STOPKY.LOG RAR a SAMPLE.RAR SAMPLE.TXT STOPKY STOP >>STOPKY.LOG TYPE STOPKY.LOG

WATCHDOG.COM

Program : WatchDog ver.1.02 Function: WatchDog schedules cold reboot of this PC at specified absolute or relative time by executing JMP FFFF:0 when CMOS time reaches the scheduled time. This resident program will work only in DOS if interrupts remain enabled. Usage : Watchdog is intended to reset unattended computer when unexpected condition occurs such as communication breakdown or critical error. Put "WatchDog /I" into your AUTOEXEC.BAT and add something like "WatchDog +1:00" before launching any application which may potentionally freeze. Syntax : WatchDog /I ... install TSR to upper memory WatchDog /J ... install TSR to conventional memory WatchDog /U ... uninstall TSR from memory WatchDog /C ... cancel previously scheduled reboot WatchDog hh:mm ... schedule reboot at hh:mm (absolute time) WatchDog +hh:mm ... schedule reboot hh:mm relative from now hh:mm may be 0:00 to 23:59

#.COM

Program : # ver. 1.01 Function : This utility maintains internal decadic nine-digit counter and puts it's contents on standard output. Value of the counter and all parameters are kept in the #.COM file (you must have write/modify rights to change the number). Parameters: n ... set counter to n and output (n=1..999999999) +n ... increment counter by n and output -n ... decrement counter by n and output /S ... skip leading zeroes (all but last) /Z ... display leading zeroes /s ... display only the last s digits (s=1..9) Errorlevel: 0 ... everything is OK 4 ... cannot write to #.COM or file corrupted 8 ... bad or none parameter given Examples : # .. just output without modifying # +1 .. most usual usage # 0 /4 /Z .. prepare counter to yield numbers 0001,0002,0003... # 7 /1 .. prepare counter to yield numbers 8,9,0,1,..