Endpoint List files
Name
list_files
Description
Parameters
| Parameter | Required | Options | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Name:
Label: Filter files by extensions |
|
|||||||||||||||||||||
|
Name:
Label: Path |
||||||||||||||||||||||
|
Name:
Label: Recursively scan subfolders |
|
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| Id |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| Name |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| Type |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| PathLower |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| PathDisplay |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| ClientModified |
DT_DBTIMESTAMP
|
datetime
|
||
| ServerModified |
DT_DBTIMESTAMP
|
datetime
|
||
| Revision |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| Size |
DT_I8
|
bigint
|
||
| IsDownloadable |
DT_BOOL
|
bit
|
||
| ContentHash |
DT_WSTR
|
nvarchar(4000)
|
4000 |
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Examples
SSIS
Use Dropbox Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
| Optional Parameters | |
|---|---|
| Filter files by extensions | |
API Destination
| Optional Parameters | |
|---|---|
| Filter files by extensions | |
ODBC application
Use these SQL queries in your ODBC application data source:
List files in a folder
<p>Returns only file entries (no folders) in the given path. Useful when you need file IDs or paths for download or read operations.</p>
SELECT *
FROM list_files
List files in a folder recursively
<p>Returns all files under the given path and every subfolder. Set <code>Path</code> and <code>Recursive='true'</code> to include nested files.</p>
SELECT *
FROM list_files
WITH (Path='/myfolder'
,Recursive='true')
List files in a folder by extension
<p>Lists only files whose names match the given extensions (e.g. .csv, .txt, .dat). Use the <code>Filter</code> parameter with a JSONPath expression that filters by <code>.tag</code> and name pattern.</p>
SELECT *
FROM list_files
WITH (Path='/myfolder'
,Filter='$.entries[?(@[''.tag'']==''file'' && @name=~/(\.csv|\.txt|\.dat)$/)]')
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
List files in a folder
<p>Returns only file entries (no folders) in the given path. Useful when you need file IDs or paths for download or read operations.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM list_files';
EXEC (@MyQuery) AT [LS_TO_DROPBOX_IN_GATEWAY];
List files in a folder recursively
<p>Returns all files under the given path and every subfolder. Set <code>Path</code> and <code>Recursive='true'</code> to include nested files.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM list_files
WITH (Path=''/myfolder''
,Recursive=''true'')';
EXEC (@MyQuery) AT [LS_TO_DROPBOX_IN_GATEWAY];
List files in a folder by extension
<p>Lists only files whose names match the given extensions (e.g. .csv, .txt, .dat). Use the <code>Filter</code> parameter with a JSONPath expression that filters by <code>.tag</code> and name pattern.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
FROM list_files
WITH (Path=''/myfolder''
,Filter=''$.entries[?(@[''''.tag'''']==''''file'''' && @name=~/(\.csv|\.txt|\.dat)$/)]'')';
EXEC (@MyQuery) AT [LS_TO_DROPBOX_IN_GATEWAY];