ODBC guide

Read files in a folder


Gets only files in a folder. Set Filter to @.file to list files only. Supply DriveId and FolderId.

SELECT * 
FROM list_folder
WITH (
	  DriveId='me'
	  --OR-- Use Shared Drive Id or other User's Drive Id
	  --DriveId='b!GtLN726LE0eXXXXXXXXXXXX'
	  
	  --Path must end with colon
	  ,FolderId='/root:' 	
      --,FolderId='/root:/my-subfolder:'
	  
	  --OR-- (Folder ID)
	  --,FolderId='atLNaXXXXXXXXXXXXxx'
      
	  ,Filter='$.value[?(@.file)]'
	  )
	  
--You can get DriveId by selecting from 'Drives' table.
--You can get FolderId by selecting from 'list_root' table OR selection from 'list_folder'.