Skip to content
Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › Operating System Functions › CurDir

CurDir

Returns the current folder.

Syntax

Declare Function CurDir ( ) As String

Description

Returns the current directory/folder.

Return Value

A String which is set to the name of the current directory/folder.

Remarks

Usage

result = CurDir

Dialect Differences

  • Not available in the -lang qb dialect unless referenced with the alias __Curdir.

Differences from QB

  • New to FreeBASIC

See also

Examples

Print CurDir
output will vary.


Category: Operating System Functions
Kind: function


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