Mail Archives: djgpp-workers/2001/03/04/11:00:05
> From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
> Date: Sun, 4 Mar 2001 15:34:30 +0100 (MET)
>
> According to Richard Dawe:
> > ginstall c:/windows/command.com b
> >
> > creates b.exe. I haven't yet written code to distinguish between .exe and
> > .com formats.
>
> As COMMAND.COM is an .EXE in disguise you won't be able to do this
> right unless you look at the extension.
For whatever reasons, I didn't see the original message, so I might be
off target...
Please note that whatever trickery I put inside ginstall, it had only
one purpose: to make commands such as "ginstall foo /usr/local/bin/foo"
silently DTRT, i.e. create /usr/local/bin/foo.exe.
Given that, why would we want "ginstall command.com b" do anything
specific, one way or the other? Why would someone do such a... how
should I put it gently?.. weird thing?
I think if the user wants the destination file have a specific
extension, she should kindly specify that extension explicitly.
> > I am unsure how to decide that a file is a DOS batch file. The patches to
> > ginstall for DJGPP currently modify the target filename, depending on the
> > source file's file format. Here's some pseudo-code:
>
> ... this. The easiest way is to look at the extension of the filename.
Yes, a batch file _must_ have a .bat extension, otherwise COMMAND.COM
won't run it as a batch file. If you want to be fancy, add support
for *.btm files as well.
Again, since I missed the original message, I don't even understand
why do you want to detect batch files.
- Raw text -