Help Center
Help CenterFreeBASIC

ExePathfunction

Returns the path of the running program

Operating System Functionsfunctiondocumented

Syntax

Declare Function ExePath ( ) As String

Return value


A String variable set to the path of the running program.

Description


Returns the path (the location) of the calling program. This is not necessarily the same as CurDir.

Remarks

Usage


result = ExePath

Dialect Differences


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

Differences from QB


  • New to FreeBASIC

See also


Example


Dim pathname As String = ExePath

Print "This program's initial directory is: " & pathname



Reference

  • Documented in KeyPgExepath.html