User Tools

Site Tools


accessing_20files_20with_20no_20extension

Accessing files with no extension

by Jon Ripley, May 2006

When using OPENIN, OPENUP and OPENOUT to create or access files that do not have a file extension the default action of BBC BASIC is to append a .bbc file extension. To create or access files with no file extension you must add a full stop to the file name.

To OPENIN, OPENUP or OPENOUT a file called MyFile use:

        hfile% = OPENIN "MyFile."
        hfile% = OPENOUT "MyFile."
        hfile% = OPENUP "MyFile."

The same applies when accessing files with no extension using a star command or OSCLI:

        *DISPLAY MyFile.
        *COPY MyOldFile. MyNewFile.

The default file extensions appended by the star commands or OSCLI when none is supplied are as follows:

*CHDIR (*CD)
none
*COPY
.BBC
*DELETE (*DEL, *ERASE)
.BBC
*DIR
.BBC
*DISPLAY
.BMP
*EXEC
.BBC
*GSAVE (*SCREENSAVE)
.BMP
*LIST / *TYPE
.BBC
*LOAD / *SAVE
.BBC
*LOCK / *UNLOCK
.BBC
*MKDIR (*MD)
none
*PLAY
.MID
*RENAME (*REN)
.BBC
*RMDIR (*RD)
none
*RUN
none
*SPOOL / *SPOOLON
.BBC
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
accessing_20files_20with_20no_20extension.txt · Last modified: 2024/01/05 00:22 by 127.0.0.1