Skip to content

Operating System Functions

Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Operating System Functions › Operating System Functions

Operating System Functions

Statements and procedures for working with files, directories and the system.

Description

The statements and procedures listed here provide access to the operating system environment. They transfer execution to external programs, get information about files and directories, manipulate the file system and send commands to the command shell.

Working with Files

Procedures that deal with files.

Working with Directories

Various directory management procedures.

File Properties

Get information about files.

System Procedures

Procedures for working with the environment.

Working with Files

Exec and Chain

Temporarily transfers control to another program.

Run

Transfers control to another program.

Kill

Deletes an existing file.

Name

Renames an existing file.

File Properties

FileAttr

Gets information about a file bound to a file number.

FileCopy

Copies a file.

FileDateTime

Gets the last modified date and time of a file.

FileExists

Tests for the existence of a file.

FileLen

Gets the length (in bytes) of a file.

FileSetEof

Sets the length of an open file bound to a file number.

FileFlush

Flushes application or system buffers for an open file bound to a file number.

Working with Directories

CurDir

Gets the current working directory.

ChDir

Sets the current working directory.

Dir

Gets the names of files or directories matching certain attributes.

ExePath

Gets the directory of the current running program.

MkDir

Creates a new directory.

RmDir

Deletes an existing directory.

System Procedures

Fre

Gets the amount of free memory (in bytes) available.

Command

Gets the command-line parameters passed to the program.

Environ

Gets the value of an environment variable.

IsRedirected

Checks whether stdin or stdout is redirected to a file or not.

SetEnviron

Sets the value of an environment variable.

Shell

Sends a command to the system command interpreter.

System

Closes all open files and exits the program.


Category: Operating System Functions


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally