Help / WLanguage / WLanguage functions / Communication / OBEX functions
  • Operating mode
  • Limitation
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
OBEXListFile (Function)
In french: OBEXListeFichier
Lists the files shared by a device that is using the OBEX protocol.
Remark: This function cannot be used if the transfer is performed by infrared.
sMACAddress is string
// Retrieve the MAC address of Bluetooth device
// The address is stored in a table column
sMACAddress = TABLE_Devices.COL_MACAddr[TABLE_Devices]
// OBEX connection
EDT_OBEXID = OBEXConnect(obexBluetooth, sMACAddress)
// Retrieve the simple list of shared files
FileList is string = OBEXListFile(EDT_OBEXID)
<Result> = OBEXListFile(<Identifier of OBEX connection> [, <Home directory> [, <Level of details>]])
<Result>: Character string
List of directory files:
  • in simple mode: list in the following format:
    <Name of file 1> + TAB + <Type 1> + CR + ... <Name of file N> + TAB + <Type N>
    where <Type> corresponds to "F" if the element is a file and to "D" if the element is a directory.
  • in detailed mode: list in the following format:
    <Name of File 1> + TAB + <Type 1> + TAB + <Size in Bytes 1> + TAB + <Rights 1> + TAB + <Modification Date 1> + TAB + <Creation Date 1> + TAB + <Access Date 1> + CR + ...
    where <Type> corresponds to "F" if the element is a file and to "D" if the element is a directory,
    <Rights> is a string that can contain the letters "R" (read rights), "W" (write rights) and "D" (erase rights).
    Dates are in "YYYYMMDDHHmmSS" format.
If the obexListDirectory constant is used, these lists will also contain the sub-directories. This list may possibly contain a ".." directory if the root of the tree structure of the OBEX server is not listed.
<Identifier of OBEX connection>: Integer
Identifier of the OBEX connection to use. This identifier is returned by OBEXConnect.
<Home directory>: Optional character string
Name of the directory to list. The transfer directory is used if this parameter is not specified.
<Level of details>: Optional Integer constant (or combination of constants)
Level of result details:
obexListDetailed<Result> contains the list of files in detailed mode.
obexListDirectory<Result> contains the list of files and directories. This constant can be combined with obexListSimple and obexListDetailed. When it is used on its own, it is equivalent to obexListSimple + obexListDirectory.
(Default value)
<Result> contains the list of files in simple mode.

Operating mode

The name of the directory to list is not always known. A first call to OBEXListFile (without directory name) is used to list the root of OBEX tree structure. If the mobile devices supports the creation of sub-directories, you will have the ability to call OBEXListFile by specifying the name of a subdirectory.


Only the Microsoft bluetooth stacks are supported by this function. To know the stack used, call BTStack.
For more details, see Which stacks to use?
Component: wd270com.dll
Minimum version required
  • Version 12
This page is also available for…
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help