Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

batch compiler

41 views
Skip to first unread message

ad...@unishef.co.uk

unread,
Feb 14, 2000, 3:00:00 AM2/14/00
to
Does ahyone know of a freeware program that compiles batch files int0
executables quickly and easily? I need one and Ive lost the one I had
called batch Compiler, so if anyone can help.....


Thanks

Outsider

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
Todd wrote:
>
> Outsider <nonvali...@yahoo.com> wrote in message
> news:38A86AA2...@yahoo.com...
> > ftp://garbo.uwasa.fi/pc/pcmagutl/bat2ex15.zip
> > bat2ex15.zip 37,222 October 26, 1991
> > Compile batch files into .com files, PC-Mag update
> >
> > ftp://garbo.uwasa.fi/pc/batchutil/tbt324.zip
> > tbt324.zip 51,094 April 21, 1999
> > TurboBAT Batch File Compiler; Foley Hi-Tech Systems
> >
> > ftp://garbo.uwasa.fi/pc/batchutil/pwrbt14j.zip
> > pwrbt14j.zip 139.184 27-05-91 1.40
> >
> > --
>
> Outsider, which of the three do you use most or like best?

So far, I have only used the bat2exec by Douglas Boling.
What I can say about it is it can only handle very simple batch files,
and it doesn't always work if there is a .com file already existing
which you wish to overwrite - the .com file should be deleted first.
It does not allow the :: as a remark indicator, but sees is as a
duplicate label (error).

Both powerbatch turbobat seem to be high level proprietary languages
which combine with batch files. Way more than just a compilers.

From the powerbatch documentation:

There are four major reasons for using a compiled PowerBatch
program:

1)
The resulting program will almost certainly execute
considerably faster. While it might be possible to
construct a compiled PowerBatch program that does not
execute faster, it would have to consist entirely of pre-
existing executable modules.
2)
PowerBatch commands provide a considerable increase in
flexibility and power over conventional batch files.
3)
PowerBatch programs cannot be changed without making
machine code modifications. This means additional
security for distributed batch files.
4)
PowerBatch programs can be created quickly for the
PowerBatch command set is a very high level language.

PowerBatch commands fall into 5 classes of commands;

1)
Commands which provide systems information. These commands
provide the current color settings, the current date, the
current time, check for the existence of a valid drive
letter, and commands which check for the existence of a
directory or a file.
2)
Commands which control the flow of the batch program.
Execute different portions of the batch program based on
existence or non-existence of directories or files. Compare
the contents of one variable with the contents of another
variable or a constant and execute different portions of the
batch program based on the results of the compare.
3)
Commands which control the way text is printed on the
screen. Change any portion of the screen to any valid screen
color, cause a message to blink on the screen, or highlight
a message in reverse video.
4)
Commands which provide string manipulation. Change a string
to all upper case characters, or all lower case characters.
Extract a portion of a string such as the first three
characters or the last four characters. Build a new string
from two existing strings by concatenation of the two
strings.
5)
Commands which deal with screen writing and input from the
keyboard. These commands are the main power in the
PowerBatch system. Directly address any position on the
screen and move the cursor to that position to read or write
text. Automatically center a message or title on any line.
Draw boxes around portions of the screen to enhance screen
appearance. Read a single key from the keyboard, read the
response to a query that only accepts a yes or no response,
read a string of characters from the keyboard with a
specified maximum length, and read keys from the keyboard
automatically changing the characters to upper case.
-----------
From the turbobat documentation:

TurboBAT is a multipass batch file compiler. It takes interpreted
DOS batch files and turns them into binary programs that can execute
up to as much as 4 times faster than normal batch files. While
supporting most of the normal DOS functions that can be called from
within a batch file, TurboBAT also provides many additional features
including support for many 4DOS/NDOS commands.

ECHOS ECHOS [message]
Displays the message without appending a cr/lf to the end
of the message like ECHO does. (used to be ECHONLN but was
updated to match the 4DOS command.

ELSE If the IFF condition was false the lines from ELSE to
ENDIFF will be executed.
See Also IFF.

ELSEIFF ELSEIFF condition [THEN]
Similar structure to the IFF command. If the previous IFF
was false and the current condition is true the code
following will be executed to the next ELSE, ELSEIFF, or
ENDIFF statement. Each use of ELSEIFF counts as a nesting
level. The compiler actually converts this command into
logical ELSE^IFF^ENDIFF statements.
See Also IFF.

ENDIFF Terminates an IFF statement.
See Also IFF.
-----------

Both powerbatch turbobat seem to be able to change both master and
child environments. I wish I had time to experiment with these.
Perhaps someone else could check them out and report their findings?


Regards,
Outsider
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
"Men never do evil so completely and cheerfully as when they do it
from religious conviction." -- Blaise Pascal

Todd

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to

Outsider <nonvali...@yahoo.com> wrote in message
news:38A91299...@yahoo.com...
<snip>

> Both powerbatch turbobat seem to be able to change both master and
> child environments. I wish I had time to experiment with these.
> Perhaps someone else could check them out and report their findings?
>

I have used the first two myself already but not the third. That was a while
ago and as I recall they didn't suit my needs. I recall most of what you
said above, and I especially remember the turbo batch with it's authors
banner every time the compiled batch program ran. I think it was shareware
as I recall so that contributed to me turning away from it. Thanks for the
time you spent pasting the snippets, but I was only looking for your
opinion. I just figured you may have given them a longer trial run than I
did. Thanks again.

Outsider

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
Todd wrote:
>
[snipped]

> Outsider, which of the three do you use most or like best?

BTW, in case your interested, here is one way to use bat2exec.com

:: partsize.bat
@ECHO off
IF "%1"=="rec" GOTO recurs
ECHO @PROMPT $N:$_CD $P> %temp%.\setback.bat
%COMSPEC% /E:2048 /C%temp%.\SETBACK.BAT> %temp%.\goback.bat
%temp%.\
CD %temp%.
DEL setback.bat
IF exist huge.com del huge.com
UNFORMAT.COM /L /PARTN |FIND.EXE "HUGE" >parttemp.bat
SET cnt=
ECHO @ECHO off> huge.bat
ECHO IF "%%cnt%%"=="" SET drive C=%%2>> huge.bat
ECHO IF "%%cnt%%"=="*" SET drive D=%%1>> huge.bat
ECHO IF "%%cnt%%"=="**" SET drive E=%%1>> huge.bat
ECHO IF "%%cnt%%"=="***" SET drive F=%%1>> huge.bat
ECHO IF "%%cnt%%"=="****" SET drive G=%%1>> huge.bat
ECHO IF "%%cnt%%"=="*****" SET drive H=%%1>> huge.bat
ECHO IF "%%cnt%%"=="******" SET drive I=%%1>> huge.bat
ECHO IF "%%cnt%%"=="*******" SET drive J=%%1>> huge.bat
ECHO IF "%%cnt%%"=="********" SET drive K=%%1>> huge.bat
ECHO IF "%%cnt%%"=="*********" SET drive L=%%1>> huge.bat
ECHO IF "%%cnt%%"=="**********" SET drive M=%%1>> huge.bat
ECHO IF "%%cnt%%"=="***********" SET drive N=%%1>> huge.bat
ECHO IF "%%cnt%%"=="************" SET drive O=%%1>> huge.bat
ECHO IF "%%cnt%%"=="*************" SET drive P=%%1>> huge.bat
ECHO IF "%%cnt%%"=="**************" SET drive Q=%%1>> huge.bat
ECHO IF "%%cnt%%"=="***************" SET drive R=%%1>> huge.bat
ECHO IF "%%cnt%%"=="****************" SET drive S=%%1>> huge.bat
ECHO IF "%%cnt%%"=="*****************" SET drive T=%%1>> huge.bat
ECHO IF "%%cnt%%"=="******************" SET drive U=%%1>> huge.bat
ECHO IF "%%cnt%%"=="*******************" SET drive V=%%1>> huge.bat
ECHO IF "%%cnt%%"=="********************" SET drive W=%%1>> huge.bat
ECHO IF "%%cnt%%"=="*********************" SET drive X=%%1>> huge.bat
ECHO IF "%%cnt%%"=="**********************" SET drive Y=%%1>> huge.bat
ECHO IF "%%cnt%%"=="***********************" SET drive Z=%%1>> huge.bat
ECHO SET cnt=%%cnt%%*>> huge.bat
BAT2EXEC.COM huge.bat
CLS
ECHO.
IF not exist huge.com echo error
DEL huge.*
%comspec%/E:24000/K%0 rec
GOTO end

:recurs
CALL parttemp.bat
DEL parttemp.bat
SET cnt=
CALL GOBACK.BAT
DEL %temp%.\goback.bat
SET |FIND.EXE "DRIVE"
EXIT

:end
::
This will not work in Windows, only in DOS.
The output on my system looks like this:

C DRIVE=251M
D DRIVE=251M
E DRIVE=251M
F DRIVE=251M
G DRIVE=251M
H DRIVE=251M
I DRIVE=251M
J DRIVE=251M
K DRIVE=251M
L DRIVE=824M
M DRIVE=252M
N DRIVE=252M
O DRIVE=252M
P DRIVE=252M
Q DRIVE=252M
R DRIVE=252M
S DRIVE=252M
T DRIVE=252M
U DRIVE=252M
V DRIVE=827M

Of course, if you actually need to work with the variables,
you would do that before the EXIT.

--

Todd

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
I've seen this before but I don't have undelete in my machine.
Could you paste the contents of "parttemp.bat" for me? Please.

Outsider <nonvali...@yahoo.com> wrote in message

news:38A951FB...@yahoo.com...

Outsider

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
Todd wrote:
>
> I've seen this before but I don't have undelete in my machine.
> Could you paste the contents of "parttemp.bat" for me? Please.
>

You mean unformat.com, but I gather you don't have undelete.exe
either.

This is how partemp.bat looks. I don't know if other people's
hard disks are different.

UNFORMAT.COM /L /PARTN |FIND.EXE "HUGE" >parttemp.bat

HUGE Boot 251M 514017 0 1 1 3103 62 63 63
HUGE 251M 514017 32 1 1 3135 62 63 63
HUGE 251M 514017 64 1 1 3167 62 63 63
HUGE 251M 514017 96 1 1 3199 62 63 63
HUGE 251M 514017 128 1 1 3231 62 63 63
HUGE 251M 514017 160 1 1 3263 62 63 63
HUGE 251M 514017 192 1 1 3295 62 63 63
HUGE 251M 514017 224 1 1 3327 62 63 63
HUGE 251M 514017 256 1 1 3359 62 63 63
HUGE 824M 1686762 288 1 1 3464 62 63 63
HUGE 252M 516033 1 1 1 1088 63 63 63
HUGE 252M 516033 65 1 1 1152 63 63 63
HUGE 252M 516033 129 1 1 1216 63 63 63
HUGE 252M 516033 193 1 1 1280 63 63 63
HUGE 252M 516033 257 1 1 1344 63 63 63
HUGE 252M 516033 321 1 1 1408 63 63 63
HUGE 252M 516033 385 1 1 1472 63 63 63
HUGE 252M 516033 449 1 1 1536 63 63 63
HUGE 252M 516033 513 1 1 1600 63 63 63
HUGE 827M 1693377 577 1 1 1810 63 63 63

You can see where disk0 and disk1 begin. I use disk1 as a backup for
disk0. I keep a primary partition only on disk0 so I have no interlaced
drive letters. Disk0 is C thru M and disk1 is L thru V.

Outsider

unread,
Feb 15, 2000, 3:00:00 AM2/15/00
to
Outsider wrote:
>
>
> You can see where disk0 and disk1 begin. I use disk1 as a backup for
> disk0. I keep a primary partition only on disk0 so I have no interlaced
> drive letters. Disk0 is C thru M and disk1 is L thru V.
>

Ok sorry, I meant C thru L and M thru V.

Todd

unread,
Feb 16, 2000, 3:00:00 AM2/16/00
to

Outsider <nonvali...@yahoo.com> wrote in message
news:38A9C1D3...@yahoo.com...
> You can see where disk0 and disk1 begin. I use disk1 as a backup for
> disk0. I keep a primary partition only on disk0 so I have no interlaced
> drive letters. Disk0 is C thru M and disk1 is L thru V.
>
> --
> Regards,
> Outsider
> MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
> "Men never do evil so completely and cheerfully as when they do it
> from religious conviction." -- Blaise Pascal

Yes, I meant unformat but my darn fingers typed undelete, which I do keep
around for emergencies on FAT16 drives. With the output above I can see how
it works now. Specifically, I was curious why the C drive used %2 but the
rest used %1 to get the drive sizes, which is now obvious to me. Thanks for
posting it dude.

BTW, why so many partitions? I'm guessing you have tons of small files and
want to squeeze every last byte you can into each 3GB physical drive (if I
approximated them correctly). It looks like it might be messy to backup, but
I'm sure you have optimization down to a science there too (this is not a
flame, rather a pat on the back). :-)

Outsider

unread,
Feb 16, 2000, 3:00:00 AM2/16/00
to
Todd wrote:
>
> Outsider <nonvali...@yahoo.com> wrote in message
> news:38A9C1D3...@yahoo.com...
> > Todd wrote:
> > >
> > > I've seen this before but I don't have undelete in my machine.
> > > Could you paste the contents of "parttemp.bat" for me? Please.
> > >
> >
> > You mean unformat.com, but I gather you don't have undelete.exe
> > either.
> >
> > This is how partemp.bat looks. I don't know if other people's
> > hard disks are different.
> > UNFORMAT.COM /L /PARTN |FIND.EXE "HUGE" >parttemp.bat

[parttemp.bat snipped]

> >
> > You can see where disk0 and disk1 begin. I use disk1 as a backup for
> > disk0. I keep a primary partition only on disk0 so I have no interlaced

> > drive letters. Disk0 is C thru L and disk1 is M thru V.
> >
> > --


>
> Yes, I meant unformat but my darn fingers typed undelete, which I do keep
> around for emergencies on FAT16 drives. With the output above I can see how
> it works now. Specifically, I was curious why the C drive used %2 but the
> rest used %1 to get the drive sizes, which is now obvious to me. Thanks for
> posting it dude.
>
> BTW, why so many partitions? I'm guessing you have tons of small files and
> want to squeeze every last byte you can into each 3GB physical drive (if I
> approximated them correctly). It looks like it might be messy to backup, but
> I'm sure you have optimization down to a science there too (this is not a
> flame, rather a pat on the back). :-)

Sure, I have tons of small files, for example:
C: 6.218 file(s) 192.471.295 bytes
D: 1.994 file(s) 116.064.555 bytes
E: 2.613 file(s) 225.454.893 bytes
F: 3.874 file(s) 201.134.103 bytes
G: 2.581 file(s) 153.273.619 bytes
H: 1.748 file(s) 209.705.017 bytes
I: 7.205 file(s) 141.507.914 bytes
J: 6.241 file(s) 189.623.455 bytes
K: 8.044 file(s) 215.607.782 bytes
L: 11.005 file(s) 466.383.150 bytes

(above is DIR output)

I find it's easier to organize and find things with more drives
and many things are faster with small drives plus, for example
if I need to search a drive for a file it doesn't take so long.
Then there is the space savings you mentioned, the clusters on
all but one drive are 4K. Also the remote possibility of
accidently formating a small drive is not so intimidating
because there is less to lose.

C - DOS/Windows and OS related, batch files, important utilities
D - Windows permanant swap file, Navigator user and cache files,
temp directory for non-transitory temp files ;-).
E - Programs which are not critical to system, but may sometimes be used.
F - Installation files for all critical programs on C, Windows update
and help files and some knowledge base articles, a few other programs.
G - Image files, complete extra Windows installation, various data files.
H - Internet applications of all types, and some related other applications.
I - Extra backup for batch files, root directory backup, original default
Windows installation, files from an old harddrive and miscellaneous.
J - Clipart and graphics.
K - Zip files
L - Designated for CD-ROM copies, currently used for miscellaneous storage.

"DRVSPACE /LI" output:

Drive Type Total Free Total Size
----- -------------------------- ---------- ----------
A Removable-media drive No disk in drive
B Removable-media drive No disk in drive
C Local hard drive 51,29 MB 250,72 MB
D Local hard drive 134,88 MB 250,72 MB
E Local hard drive 29,38 MB 250,72 MB
F Local hard drive 49,84 MB 250,72 MB
G Local hard drive 98,07 MB 250,72 MB
H Local hard drive 46,05 MB 250,72 MB
I Local hard drive 96,47 MB 250,72 MB
J Local hard drive 55,29 MB 250,72 MB
K Local hard drive 21,85 MB 250,72 MB
L Local hard drive 246,17 MB 823,39 MB
M Local hard drive 56,21 MB 251,71 MB
N Local hard drive 190,40 MB 251,71 MB
O Local hard drive 14,72 MB 251,71 MB
P Local hard drive 65,11 MB 251,71 MB
Q Local hard drive 100,14 MB 251,71 MB
R Local hard drive 61,22 MB 251,71 MB
S Local hard drive 95,59 MB 251,71 MB
T Local hard drive 66,57 MB 251,71 MB
U Local hard drive 38,10 MB 251,71 MB
V Local hard drive 248,31 MB 826,63 MB
W Local RAMDrive 7,23 MB 7,98 MB
Y Floppy drive 0,53 MB 1,39 MB


Drvspace.exe output can be redirected and filtered. The command works
even when Windows is running. I gather you don't have drvspace.exe :-(.
Drive Y: is a 120LS-120 parallel port drive.

Backup from one disk to the other is very easily done with a
dedicated batch file using xcopy. Having only one primary on
disk0 doesn't bother me at all; it just means I can't boot from
disk1, but that doesn't matter - if I boot from a prepared floppy
disk1 is the same as disk0. There are 4 or 5 computer stores
within a ten minute walk from my house, so I can quickly pick up
a replacement hard disk if the need arises.

--
Regards,
Outsider
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08

Statistics are like bikinis; what they conceal is more important than
what they reveal.

Todd

unread,
Feb 16, 2000, 3:00:00 AM2/16/00
to

Outsider <nonvali...@yahoo.com> wrote in message
news:38AAE12D...@yahoo.com...
<snip>

>
> Drvspace.exe output can be redirected and filtered. The command works
> even when Windows is running. I gather you don't have drvspace.exe :-(.
> Drive Y: is a 120LS-120 parallel port drive.
>
> Backup from one disk to the other is very easily done with a
> dedicated batch file using xcopy. Having only one primary on
> disk0 doesn't bother me at all; it just means I can't boot from
> disk1, but that doesn't matter - if I boot from a prepared floppy
> disk1 is the same as disk0. There are 4 or 5 computer stores
> within a ten minute walk from my house, so I can quickly pick up
> a replacement hard disk if the need arises.
>
> --
> Regards,
> Outsider
> MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
> Statistics are like bikinis; what they conceal is more important than
> what they reveal.

In 95/95 the command returns "You have specified an invalid argument: /LI"
in a MSGBOX window. When windows is running DRVSPACE.EXE runs the GUI
version. :-( Even if I try to trick it by creating a pif set to not allow
windows detection, I get "This program requires Microsoft Windows". No big
deal, I didn't have a need to do this. I just wondered about the unformat
output so I could make sense of the batch. Thanks again for your efforts and
time.

BTW, I knew you had a scheme to your madness, I think you posted this for me
once before too, or am I just having a dejavu attack?

0 new messages