Reference

Endpoint List files


Name

list_files

Description

Lists files within a folder

Parameters

Parameter Required Options
Name: FilterFilesByExtension

Label: Filter files by extensions

Option Value
All files
PDF pdf
Word document docx
Excel document xlsx
PNG image png
JPG image jpg
CSV file csv
Text file txt
DAT file dat
Name: Path

Label: Path

Name: Recursive

Label: Recursively scan subfolders

Option Value
true true
false false

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
If the column you are looking for is missing, consider customizing Dropbox Connector.

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

API Source - Dropbox
Read / write Dropbox data inside your app; perform many Dropbox operations without coding, just use easy to use high performance API Connector for Dropbox
Dropbox
List files
Optional Parameters
Filter files by extensions
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Dropbox
Read / write Dropbox data inside your app; perform many Dropbox operations without coding, just use easy to use high performance API Connector for Dropbox
Dropbox
List files
Optional Parameters
Filter files by extensions
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

List all files within a folder

SELECT *
  FROM list_files

List all files within a folder and its subfolders recursively

SELECT *
  FROM list_files
  WITH (Path='/myfolder'
       ,Recursive='true')

List files within a folder by extension

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 all files within a folder

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
  FROM list_files';

EXEC (@MyQuery) AT [LS_TO_DROPBOX_IN_GATEWAY];

List all files within a folder and its subfolders recursively

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *
  FROM list_files
  WITH (Path=''/myfolder''
       ,Recursive=''true'')';

EXEC (@MyQuery) AT [LS_TO_DROPBOX_IN_GATEWAY];

List files within a folder by extension

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];