FT_ORIGIN()
Report the drive, path and filename of the current program
──────────────────────────────────────────────────────────────────────────────

Syntax

FT_ORIGIN() -> cString

Arguments

None

Returns

A string containing the full drive/directory/filename of
the currently executing file.

Description

Often users will install multiple copies of application software,
especially on networks and in situations where the user is trying
to get around a copy protection scheme.

This function enables you to learn the name and source location
of the currently executing file, so that you may take whatever
action you need to.

Requires DOS v3.xx and above.

Examples

cMyFile := FT_ORIGIN()

IF cMyFile <> "C:\APPDIR\MYFILE.EXE"
?"Incorrect startup file. Please remove/rename and start again"
QUIT
ENDIF

Header File: extend.h

Source: ORIGIN.C

Author: Steve Larsen