This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
Application file

Application file 


 

Application file -> Function result 
Parameter Type   Description
Function result  String in Long name of the 4D executable file or application

The Application file command returns the long name of the 4D executable file or application you are running.

On Windows
If, for example, you are running 4D located at \PROGRAMS\4D on the volume E, the command returns E:\PROGRAMS\4D\4D.EXE.

On Macintosh
If, for example, you are running 4D in the Programs folder on the disk Macintosh HD, the command returns Macintosh HD:Programs:4D.app.

Example  

At startup on Windows, you need to check if a DLL Library is correctly located at the same level as the 4D executable file. In the of your application you can write:

 If(Is Windows&(Application type#4D Server))
    C_OBJECT($appPath)
    $appPath:=Path to object(Application file)
    If(Test path name(($appPath.parentFolder)+"XRAYCAPT.DLL")#Is a document)
       ALERT("XRAYCAPT.DLL is missing. The X-ray capture capability will not be available.")
    End if
 End if



See also 

Data file
Structure file

 
PROPERTIES 

Product: 4D
Theme: 4D Environment
Number: 491

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v6

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)