Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Is there any (free) program that can build COM or EXE'S from BAT files and if so,where can I find such a program?

Bat2Com
http://www.programmersheaven.com/zone16/cat148/14524.htmCom2Exe
http://www.programmersheaven.com/zone16/cat148/3105.htm

don't use any. .bat files are stable, they don't take up any memory, and compiling them can cause all kinds of problems. apart from that you dont make yourself look professional at all, everyone knows when its a compiled batch.
- W0rm

ftp://garbo.uwasa.fi/pc/pcmagutl/bat2ex15.zip
bat2ex15.zip 37,222 October 26, 1991
Compile batch files into .com files, PC-Mag updateftp://garbo.uwasa.fi/pc/batchutil/tbt324.zip
tbt324.zip 51,094 April 21, 1999
TurboBAT Batch File Compiler; Foley Hi-Tech Systemsftp://garbo.uwasa.fi/pc/batchutil/pwrbt14j.zip
pwrbt14j.zip 139.184 27-05-91 1.40So 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).
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=827MOf course, if you actually need to work with the variables,
you would do that before the EXIT.

I dont think anyone needs to see that in the forum. Apart from that, don't bother "compiling" any batch files. It's just plain not a good idea. They have a lot of differences from standard dos batch files and I have seen them cause a lot of problems.

Yes and No to compileing Bat files.
I ask why? Most of the compilers that I have seen / used don't work right all the time, and if it is an advanced pat w/ redirection, forget about it. If you need to do something for security purposes, I suggest BASIC and compileing that. If you need to do that look in to shell() That should do the trick for you.
Oh, one mor ething.
I do IF [%1]==[x] where as some poeple do
IF '%1=='1, and both will work, it's just prefs.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |