mw22#@ANDREW.CMU.EDU (Michael Alan Wertheim) (04/25/87)
I'm having an awful time trying to get the MLI's OPEN command to work. When I give it a pathname that begins with a "/" and a prefix, it works fine, but when I give it just a filename, hoping it will tack on the prefix itself, it returns a $40 -- "Pathname has invalid syntax". Any help or comments would be appreciated. Michael Wertheim Carnegie Mellon University Pittsburgh, PA Arpa: mw22@andrew.cmu.edu Bitnet: mw22@cmuccvma UUCP: ...!{seismo, ucbvax, harvard}!andrew.cmu.edu!mw22#
schumann@puff.WISC.EDU (Christopher Schumann) (04/27/87)
mw22#@ANDREW.CMU.EDU (Michael Alan Wertheim) writes: > when I give [the MLI] just a filename, hoping it will tack on the prefix > itself, it returns a $40 -- "Pathname has invalid syntax". > Any help or comments would be appreciated. > Michael Wertheim I had the very same problem quite a while back. The problem occurs only when there is NO prefix (which happens a lot in BASIC.system). If there is no prefix in BASIC, the BI will look in the current drive (with the ONLINE command) and give you that name as the prefix, when there really isn't one. The BI also prepends that name to many file names. To get your program to work, you must explicity set the prefix. Either with the PREFIX command from BASIC, or in your ML program with ONLINE, and SET_PREFIX. Hope that helps, Chris Schumann schumann@puff.wisc.edu
eww@OBERON.LCS.MIT.EDU.UUCP (04/27/87)
-----> Mike Wertheim? sp There is a similar bug in Appleworks. This is only evident when one is loading or writing text files from APW (WP as well as DB). Seems as though when aplwks asks for the complete pathname, they expect just that! I work off a hard drive and that is a real pain when I am 4 or 5 subdirectories deep. The alternative in Aplwks is to escape back to other activities and then list all files on the current drive. After that, add a new file to the WP from a text file will require jus the filename input. THIS ONLY WORKS ONE TIME! for the next file, tis back to other activities and list all files again! Since this sounds similar with MLI, I suspect that both programs are writing the prefix to a "soft" setting. This area will need work in any extensive hard drive application. Hear us APPLE?
ranger@ecsvax.UUCP (Rick N. Fincher) (04/28/87)
In article <IUYDg-y00WAJY5U0AZ@andrew.cmu.edu>, mw22#@ANDREW.CMU.EDU (Michael Alan Wertheim) writes: > > I'm having an awful time trying to get the MLI's OPEN command to work. When > I give it a pathname that begins with a "/" and a prefix, it works fine, but > when I give it just a filename, hoping it will tack on the prefix itself, it > returns a $40 -- "Pathname has invalid syntax". Try setting the prefix first, the prefix isn't always set to the default disk. If it is not set the open command won't be able to append your file name onto it and will return an error. . Rick Fincher ranger@ecsvax >
mw22#@ANDREW.CMU.EDU (Michael Alan Wertheim) (04/29/87)
I finally got my program working by using getting the last-used unit number out of $BF30 and calling ReadBlock to read block 2 from that volume. The volume name is near the beginning of block 2 on any ProDos volume. I then tack my filename onto the prefix, put a slash in front of the whole thing, adjust the length, and all is well. (Except this won't work if the file I need is buried in a subdirectory.) It seems that the MLI should have a "set slot/drive" command that takes a unit-number as input and sets the prefix to the volume name at that unit. If there is no volume there, it should return an I/O error. Michael Wertheim Carnegie Mellon University Pittsburgh, PA Arpa: mw22@andrew.cmu.edu Bitnet: mw22@cmuccvma UUCP: ...!{seismo, ucbvax, harvard}!andrew.cmu.edu!mw22#