Filpath

Filpath creates the access path to a file on a Sage X3 application server.

Syntax

filpath(directory, filename, extension)filpath(directory, filename, extension, folder)filpath(directory, filename, extension, folder, volume)filpath(directory, filename, extension, folder, volume, server)
The parameters are the following:

Comments

The path that is returned does not correspond to an existing file, and has the following format:

server@/root_path/folder/directory/file_name.extension

The file operations such as Openi and Openo, filinfo, are able to manage files with the syntax returned by filpath.

The following rules apply to the parameter values:

Examples

# Verify that the CUSTOMER table compiled description can be accessed from the current folderIf filinfo(filpath("FIL","CUSTOMER","fde",-1),1) <0End -20 : # Does not existEndif# Compute the root path of the current folderFOLDER_PATH = filpath("", "", "")# Path of the "A" volume on the current serverA_VOLUME_PATH= filpath("!","","","","A")# Check if a given script exists in the current folderIf filinfo(filpath("TRT","MYSCRIPT","adx",0),1) <0End -20 : # Does not existEndif

See also

adxdir.