[Maxima] How to open a file given its pathname relative to the current batch script
manuel.fiorelli at gmail.com
Mon Nov 23 16:39:47 CST 2009
2009/11/23 Robert Dodier <robert.dodier at gmail.com>:
> Try this: append the path to file_search_maxima, then call file_search
> to return the path for the data file.
> file_search_maxima : cons ("/my/path/###", file_search_maxima);
> file_search ("my.data");
> => /my/path/my.data
> read_list (file_search ("my.data"));
> => (stuff)
Thanks for the answer. However, this requires I know "/my/path".
Unfortunately, I wrote a file, script.mac, which needs to
read a file, a.txt, located in the same folder, which I don't like to
be hard-coded. I'd like to run wxMaxima and choose "Batch file..." to
run the script irrespectively of its position.
More information about the Maxima