Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!psuvax1!psuvm.bitnet!cunyvm!ndsuvm1!ndsuvax!nuroehri From: nuroehri@ndsuvax.UUCP (Dean Roehrich) Newsgroups: comp.sys.apple Subject: Re: Getting a CATALOG into a file Keywords: CATALOG Message-ID: <2052@ndsuvax.UUCP> Date: 25 Jan 89 19:02:41 GMT References: <410f8301.14dd6@c> Reply-To: nuroehri@ndsuvax.UUCP (Dean Roehrich) Organization: North Dakota State University, Fargo Lines: 28 In article <410f8301.14dd6@c> bauer@procase.UUCP (Jerry Bauer) writes: > >Under ProDOS, in APPLESOFT, how can one get a list of the files on >a given disk (CATALOG) into a file? > >-- >JRBauer (Jerry) ...!tolerant!procase!bauer > ...!hpda!procase!bauer > ...!cae780!procase!bauer Under ProDOS, _any_ file, including a directory, can be opened like a text file and read with the READ statement. d$=chr$(4) dim i$(10) print d$"open " print d$"read " for i = 0 to 10 read i$(i) next print d$"close" The variable I$() should now hold the first 11 lines of the directory. This would include the directory name, the blank space, the header, filenames, the blank space, and the footer (if I got all the right). Dean #! rnews 1551 Path: psuvm.bitnet!cunyvm!