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 | ✔ | Token |
NameContains | --querry | String | ✖ | Filter by name |
Directory | --catalog | String | ✖ | Filter by parent directory ID |
Returns: Map Of KeyAndValue - Array of file mappings
1C:Enterprise/OneScript code example
Token = "ya29.a0AQQ_BDTgQbn9c5rXhPK3FCakms_7oKkdIWE1CCQFnSPftb2RxvloVqnYOcnsAKhXrD0Gq8Tz2Kgn5IBXG5E25uksZfvvTtXob-jFcuj_9LZYs9La4HrcFk766...";
Directory = "root";
NameContains = "data";
Result = OPI_GoogleDrive.GetFilesList(Token, NameContains, Directory);
- Bash
- CMD/Bat
oint gdrive GetFilesList \
--token "***" \
--querry "data" \
--catalog "root"
oint gdrive GetFilesList ^
--token "***" ^
--querry "data" ^
--catalog "root"
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": "17352",
"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-09-14T15:14:52.539Z",
"createdTime": "2024-02-29T19:22:49.616Z",
"modifiedTime": "2025-09-14T15:14:52.539Z",
"modifiedByMeTime": "2025-09-14T15:14:52.539Z",
"modifiedByMe": true,
"shared": false,
"ownedByMe": true,
"viewersCanCopyContent": true,
"copyRequiresWriterPermission": false,
"writersCanShare": true,
"originalFilename": "data.json",
"fullFileExtension": "json",
"fileExtension": "json",
"md5Checksum": "1f10959bb3b39f87c725d07595df4a86",
"sha1Checksum": "f535295f42f07daa5b38b3a9a5f8f697a6f0b23e",
"sha256Checksum": "64489ba9a07ec8fbd96c70d075ad680248d7248b029accd89ab88995cb7578d6",
"size": "19851",
"quotaBytesUsed": "19851",
"headRevisionId": "0B92vrbrhqfJrQ29CbnhwK1hnNzEwWmwwd0xLRnBPRyswVWtvPQ",
"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": [
...