• Please review our updated Terms and Rules here

DIRECTORY TO TEXT FILE?

It first depends on which Tandy computer and which DOS is used. I think not every DOS provides such a possibility.
Usually some DOSes are providing a function named 'ROUTE'. Not all DOSes allow routing to a file but LDOS does.

The following example is for LDOS 5.1.x.
I haven't used this feature yet but a theoretical possibility could be using the following LDOS functions:

1. Route all line printer data to a file: ROUTE *PR TO PRINTER/DAT
2. Do a directory output to a printer: DIR :0 (P)
3. Close the file output: RESET *PR

The directory output should now be stored in the file 'PRINTER/DAT' for future use.

I don't know if this works. Could be worth a try if no better solution will be provided here.

-Rainer
 

Attachments

  • DIR.png
    DIR.png
    207.9 KB · Views: 2
  • ROUTE.png
    ROUTE.png
    654.2 KB · Views: 2
An easy way might be to set up SPOOL and then DIR PRT to send the directory contents to the file used by the spooler. The spooler is listed as storing in a text file. I am sure there is a method of doing it all within BASIC but it isn't obvious.

I am a bit puzzled that FILES is listed as a reserved word but the FILES command does not seem to exist. FILES in most of the BASICs is DIR without shelling out to SYSTEM.
 
There are as many ways to do this as there are MENU programs written for the TRS-80! The most common is to execute a DIR command from BASIC and then PEEK the screen; but each DOS has a different layout, so you would need to write this for a specific DOS.
 
Back
Top