---
sidebar_position: 3
description: Get list of files and other functions to work with Google Drive in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Google Drive]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get list of files
 Gets the list of files



`Function GetFilesList(Val Token, Val NameContains = "", Val Directory = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | NameContains | --querry | String | &#x2716; | Filter by name |
  | Directory | --catalog | String | &#x2716; | Filter by parent directory ID |

  
  Returns:  Map Of KeyAndValue - Array of file mappings



```bsl title="1C:Enterprise/OneScript code example"
    Token        = "ya29.a0Aa7pCA9fmPZk2eeWvC-VVPtSY4UzLqhBxacbBQw80RgQUw_wRm7_TGYppXdco1mWX6DVhkJklByQ4epXj_yOMf3j0BVPvNq966JHEVow5jOasNoGJdGn27Rq4...";
    Directory    = "root";
    NameContains = "data";

    Result = OPI_GoogleDrive.GetFilesList(Token, NameContains, Directory);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint gdrive GetFilesList \
             --token "***" \
             --querry "data" \
             --catalog "root"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint gdrive GetFilesList ^
             --token "***" ^
             --querry "data" ^
             --catalog "root"
        ```
    </TabItem>
</Tabs>


```json title="Result"
[
 {
  "parents": [
   "0AN2vrbrhqfJrUk9PVA"
  ],
  "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"
   }
  ],
  "permissions": [
   {
    "kind": "drive#permission",
    "id": "07468399490707249352",
    "type": "user",
    "emailAddress": "bayselonarrend@gmail.com",
    "role": "owner",
    "displayName": "Антон Титовец",
    "photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64",
    "deleted": false,
    "pendingOwner": false
   }
  ],
  "spaces": [
   "drive"
  ],
  "capabilities": {
   "canAcceptOwnership": false,
   "canAddChildren": false,
   "canAddMyDriveParent": false,
   "canChangeCopyRequiresWriterPermission": true,
   "canChangeItemDownloadRestriction": true,
   "canChangeSecurityUpdateEnabled": false,
   "canChangeViewersCanCopyContent": true,
   "canComment": true,
   "canCopy": true,
   "canDelete": true,
   "canDisableInheritedPermissions": false,
   "canDownload": true,
   "canEdit": true,
   "canEnableInheritedPermissions": true,
   "canListChildren": false,
   "canModifyContent": true,
   "canModifyContentRestriction": true,
   "canModifyEditorContentRestriction": true,
   "canModifyOwnerContentRestriction": true,
   "canModifyLabels": false,
   "canMoveChildrenWithinDrive": false,
   "canMoveItemIntoTeamDrive": true,
   "canMoveItemOutOfDrive": true,
   "canMoveItemWithinDrive": true,
   "canReadLabels": false,
   "canReadRevisions": true,
   "canRemoveChildren": false,
   "canRemoveContentRestriction": false,
   "canRemoveMyDriveParent": true,
   "canRename": true,
   "canShare": true,
   "canTrash": true,
   "canUntrash": true
  },
  "permissionIds": [
   "07468399490707249352"
  ],
  "linkShareMetadata": {
   "securityUpdateEligible": false,
   "securityUpdateEnabled": true
  },
  "downloadRestrictions": {
   "itemDownloadRestriction": {
    "restrictedForReaders": false,
    "restrictedForWriters": false
   },
   "effectiveDownloadRestrictionWithContext": {
    "restrictedForReaders": false,
    "restrictedForWriters": false
   }
  },
  "kind": "drive#file",
  "id": "1NKMmj4SJh3WUw74nhLuMofW7dfpUR520",
  "name": "data.json",
  "mimeType": "application/json",
  "starred": false,
  "trashed": false,
  "explicitlyTrashed": false,
  "version": "20634",
  "webContentLink": "https://drive.google.com/uc?id=1NKMmj4SJh3WUw74nhLuMofW7dfpUR520&export=download",
  "webViewLink": "https://drive.google.com/file/d/1NKMmj4SJh3WUw74nhLuMofW7dfpUR520/view?usp=drivesdk",
  "iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/json",
  "hasThumbnail": false,
  "thumbnailVersion": "0",
  "viewedByMe": true,
  "viewedByMeTime": "2025-12-10T19:06:10.873Z",
  "createdTime": "2024-02-29T19:22:49.616Z",
  "modifiedTime": "2025-12-10T19:06:10.873Z",
  "modifiedByMeTime": "2025-12-10T19:06:10.873Z",
  "modifiedByMe": true,
  "shared": false,
  "ownedByMe": true,
  "viewersCanCopyContent": true,
  "copyRequiresWriterPermission": false,
  "writersCanShare": true,
  "originalFilename": "data.json",
  "fullFileExtension": "json",
  "fileExtension": "json",
  "md5Checksum": "f9d9a471e4d4c81d40fc8bdf07cfe586",
  "sha1Checksum": "823670960ee39770018292f92db005a657449f24",
  "sha256Checksum": "c4d83df2e27b0e7900828d775bb2f17a112770743f5e4977c85c27533c0a2c1c",
  "size": "21294",
  "quotaBytesUsed": "21294",
  "headRevisionId": "0B92vrbrhqfJrS2Y5S0pobGJPMitCSklaWDM4S2pKcTNkcDhjPQ",
  "isAppAuthorized": false,
  "inheritedPermissionsDisabled": false
 },
 {
  "parents": [
   "0AN2vrbrhqfJrUk9PVA"
  ],
  "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"
   }
  ],
  "permissions": [
...
```
