# List the files and folders in a specified path

List the files and folders in a specified path by using the [GetFolderItemsForPath method](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/service-global-getfolderitemsforpath.htm).

## Examples

Example 1:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/ViewDataToLoad/list-files-and-folders-in-a-path.htm)

#### The goal is to list the files and folders present in a specified path. An absolute path is entered.

The client sends:

```
 {
  "jsonrpc": "2.0",
  "id": 0,
  "method": "GetFolderItemsForPath",
  "handle": -1,
  "params": [
    "E:\\\\GIT\\\\engine-sense-fork\\\\prod\\\\data\\\\Engine\\\\test\\\\qlikviewTests\\\\ProtocolTester4Net\\\\TestData\\\\"
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "qFolderItems": [
      {
        "qName": "AggrScriptFunc.qvf",
        "qType": "FILE"
      },
      {
        "qName": "alternatestate_simple.qvf",
        "qType": "FILE"
      },
      {
        "qName": "CustomData",
        "qType": "FOLDER"
      },
      {
        "qName": "CustomScript",
        "qType": "FOLDER"
      }
    ]
  }
}

```

The files and folders located at the specified path are returned.

Example 2:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/ViewDataToLoad/list-files-and-folders-in-a-path.htm)

#### The goal is to list the files and folders present in a specified path in Qlik Sense Desktop. A relative path is entered.

In Qlik Sense Desktop, the relative path is related to the default Apps folder located in C:\Users\&lt;user name&gt;\Documents\Qlik\Sense\Apps.

The client sends:

```
 {
  "jsonrpc": "2.0",
  "id": 0,
  "method": "GetFolderItemsForPath",
  "handle": -1,
  "params": [
    "..\\.."
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "qFolderItems": [
      {
        "qName": "Examples",
        "qType": "FOLDER"
      },
      {
        "qName": "QlikView",
        "qType": "FOLDER"
      },
      {
        "qName": "Sense",
        "qType": "FOLDER"
      },
      {
        "qName": "Tutorial source",
        "qType": "FOLDER"
      }
    ]
  }
}
```

The files and folders located at the specified path are returned.

Example 3:

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/ViewDataToLoad/list-files-and-folders-in-a-path.htm)

#### The goal is to list the files and folders present in a specified path in Qlik Sense Desktop. A relative path is entered.

In Qlik Sense Desktop, the relative path is related to the default Apps folder located in C:\Users\&lt;user name&gt;\Documents\Qlik\Sense\Apps.

The client sends:

{ "jsonrpc": "2.0", "id": 0, "method": "GetFolderItemsForPath", "handle": -1, "params": [ "NewFolder" ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 0, "result": { "qFolderItems": [ { "qName": "NewFolder1", "qType": "FOLDER" }, { "qName": "NewFolder2", "qType": "FOLDER" }, { "qName": "StoreCountryLibConn.txt", "qType": "FILE" }, { "qName": "unicode.qvs", "qType": "FILE" } ] } }

The files and folders located at the specified path are returned.