Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!ANDREW.CMU.EDU!jm7e+ From: jm7e+@ANDREW.CMU.EDU ("Jeremy G. Mereness") Newsgroups: comp.sys.apple Subject: Re: Getting a CATALOG into a file Message-ID: Date: 25 Jan 89 15:49:08 GMT References: <410f8301.14dd6@c> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 49 Jerry Bauer writes..... >Under ProDOS, in APPLESOFT, how can one get a list of the files on >a given disk (CATALOG) into a file? >This code DOESN'T work: >100 PRINT CHR$(4);"OPEN TEMP.CATALOG" >110 PRINT CHR$(4);"WRITE TEMP.CATALOG" >120 CATALOG >130 PRINT CHR$(4);"CLOSE TEMP.CATALOG" >because line 120 becomes: >120 C AT A LOG >(Isn't APPLESOFT wonderful?) Catalog is not an Applesoft command; it is not contained in the ROMS that contain Applesoft. So, Applesoft attpempts to interpret the command as best it can (thus breaking it into "c at a log" where "at" and "log" are reserved keywords.... What you want to do whenver you want to issue a ProDos command from within Applesoft is PRINT the command and precede the command with a CTRL-D. It looks like this.. 120 PRINT "CATALOG" or better yet 120 PRINT CHR$(4);"CATALOG" where CHR$(4) is the same as Ctrl-D. This works for all Prodos commmands, and BTW if you ever use DOS 3.3, you should precede the Ctrl-D with a linefeed, like 120 PRINT CHR$(13);CHR$(4);"CATALOG" : REM dos 3.3 only Capt. Albatross jm7e+@andrew.cmu.edu ============ Bureuacracy takes all the fun out of computing. disclaimer: The opinions expressed herein are made under duress of academic stress and is often prone to overzealous error. The author, not enjoying the prospect of remaining eternally ignorant, therefore welcomes any replies that would further that end.