Get list of files
Gets the list of files
- Parameters
- Advanced call ?
Function GetFilesList(Val Token, Val NameContains = "", Val Directory = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| NameContains | --query | String | ✖ | Filter by name |
| Directory | --catalog | String | ✖ | Filter by parent directory ID |
Returns
Map Of KeyAndValue - Array of file mappings
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Token = "ya29.a0AT3oNZ89Gfvy6_DUg_tviJJnmBXSmGRrPL6Vym5gPCsPQEa3F606plSWJttyabLz5gHJY63An6XG9wKNlbVK4fkTSF_KNhqT5M6IGUm8THO6IWF0iGzg5z2SO...";
Directory = "root";
NameContains = "data";
Result = OPI_GoogleDrive.GetFilesList(Token, NameContains, Directory);
- Bash
- CMD/Bat
oint gdrive GetFilesList \
--token "***" \
--query "data" \
--catalog "root"
oint gdrive GetFilesList ^
--token "***" ^
--query "data" ^
--catalog "root"
Result
[
{
"kind": "drive#file",
"fileExtension": "sqlite",
"copyRequiresWriterPermission": false,
"md5Checksum": "9889ccef1b49ecd1b559a7052a244f4d",
"writersCanShare": true,
"viewedByMe": true,
"mimeType": "application/octet-stream",
"parents": [
"0AN2vrbrhqfJrUk9PVA"
],
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/octet-stream",
"shared": false,
"lastModifyingUser": {
"displayName": "Антон Титовец",
"kind": "drive#user",
"me": true,
"permissionId": "07468399490707249352",
"emailAddress": "bayselonarrend@gmail.com",
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64"
},
"owners": [
{
"displayName": "Антон Титовец",
"kind": "drive#user",
"me": true,
"permissionId": "07468399490707249352",
"emailAddress": "bayselonarrend@gmail.com",
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64"
}
],
"headRevisionId": "0B92vrbrhqfJrOFR3UWJpYzBVOXlrQi9YSWRsNkVIdmZvb0RNPQ",
"webViewLink": "https://drive.google.com/file/d/1X-gPtS0ONJ2OdDqUGXvFK4tYIeAnYHaW/view?usp=drivesdk",
"webContentLink": "https://drive.google.com/uc?id=1X-gPtS0ONJ2OdDqUGXvFK4tYIeAnYHaW&export=download",
"size": "53248",
"viewersCanCopyContent": true,
"permissions": [
{
"id": "07468399490707249352",
"displayName": "Антон Титовец",
"type": "user",
"kind": "drive#permission",
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64",
"emailAddress": "bayselonarrend@gmail.com",
"role": "owner",
"deleted": false,
"pendingOwner": false
}
],
"hasThumbnail": false,
"spaces": [
"drive"
],
"id": "1X-gPtS0ONJ2OdDqUGXvFK4tYIeAnYHaW",
"name": "data.sqlite",
"starred": false,
"trashed": false,
"explicitlyTrashed": false,
"createdTime": "2026-06-14T16:29:56.543Z",
"modifiedTime": "2026-07-17T18:44:21.775Z",
"modifiedByMeTime": "2026-07-17T18:44:21.775Z",
"viewedByMeTime": "2026-07-17T18:44:21.775Z",
"quotaBytesUsed": "53248",
"version": "489",
"originalFilename": "***",
"ownedByMe": true,
"fullFileExtension": "sqlite",
"isAppAuthorized": false,
"capabilities": {
"canChangeViewersCanCopyContent": true,
"canEdit": true,
"canCopy": true,
"canComment": true,
"canAddChildren": false,
"canDelete": true,
"canDownload": true,
"canListChildren": false,
"canRemoveChildren": false,
"canRename": true,
"canTrash": true,
"canReadRevisions": true,
"canChangeCopyRequiresWriterPermission": true,
"canMoveItemIntoTeamDrive": true,
"canUntrash": true,
"canModifyContent": true,
"canMoveItemOutOfDrive": true,
"canAddMyDriveParent": false,
"canRemoveMyDriveParent": true,
"canMoveItemWithinDrive": true,
"canShare": true,
"canMoveChildrenWithinDrive": false,
"canModifyContentRestriction": true,
"canChangeSecurityUpdateEnabled": false,
"canAcceptOwnership": false,
"canReadLabels": false,
"canModifyLabels": false,
"canModifyEditorContentRestriction": true,
"canModifyOwnerContentRestriction": true,
"canRemoveContentRestriction": false,
"canDisableInheritedPermissions": false,
"canEnableInheritedPermissions": true,
"canChangeItemDownloadRestriction": true,
"canStartApproval": false,
"canAccessViaGenAi": true
},
"thumbnailVersion": "0",
"modifiedByMe": true,
"permissionIds": [
"07468399490707249352"
],
"linkShareMetadata": {
"securityUpdateEligible": false,
"securityUpdateEnabled": true
},
"sha1Checksum": "2a00c8af3c20d5e7095b20da763b6d4b419d14a3",
"sha256Checksum": "b8e2bedcf3e76f30d6e318d422364e7a3cee7bc728f56477eba0408b5d68c910",
"inheritedPermissionsDisabled": false,
"downloadRestrictions": {
"itemDownloadRestriction": {
"restrictedForReaders": false,
"restrictedForWriters": false
},
"effectiveDownloadRestrictionWithContext": {
"restrictedForReaders": false,
"restrictedForWriters": false
}
},
"clientEncryptionDetails": {
"decryptionMetadata": {
"wrappedKey": "***",
"kaclsId": "0",
"aes256GcmChunkSize": "unset",
"keyFormat": "***",
"encryptionResourceKeyHash": "***"
}
}
},
{
"kind": "drive#file",
"fileExtension": "sqlite-journal",
"copyRequiresWriterPermission": false,
"md5Checksum": "99a88fa93400c61fdde1ad91ee1f4c49",
"writersCanShare": true,
"viewedByMe": true,
"mimeType": "application/octet-stream",
"parents": [
"0AN2vrbrhqfJrUk9PVA"
],
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/octet-stream",
...