Hello Jim,
> Is it possible for a .bat file to determine its
> location?
Yes, the filename of the batch file is contained in the parameter named
%0. That is, if you have a batch file, say C:\mydir\maxima.bat, and you
add into the maxima.bat file the first line
set FILENAME=%0
you will have available for the rest of the commands in maxima.bat, a
variable whose name is FILENAME and the contents is C:\mydir\maxima.bat.
Once you have that variable, you can save it in a file and manipulate it
with sed.exe or other tools.
Another possibility is the one indicated by Mike. A third one (more
general, and which I use extensively in AsTeX distribution) is to use the
aset.exe utility, by Richard Breuer, cf.
http://www.univ-orleans.fr/EXT/ASTEX/astex/doc/en/aset/html/aset.htm
For example, to extract the current directory C:\mydir, one can use
command.com /e:2048 /caset.exe -p X:=dir('C:')
This is valid for Win9x (95/98/ME) and WinNTx (4.0/2000/XP)
> I intend to write a better maxima.bat. The only problem is that I
> don't know anything about writing .bat files.
If that could help, I would propose that you write, in "rem" lines, the
text of what you want to do in the maxima.bat file, and I try to translate
your comments into batch commands ?
Best wishes
Michel.Lavaud@univ-orleans.fr
http://www.univ-orleans.fr/EXT/ASTEXftp://ftp.univ-orleans.fr/pub/tex/PC/AsTeX
liste de discussion: astex@univ-orleans.fr
Abonnement à la liste: envoyer un message de contenu
"sub astex Nom Prenom Etablissement" à sympa@univ-orleans.fr