how to check if folder already exists in google drive python

The solution for “how to check if folder already exists in google drive python” can be found here. The following code will assist you in solving the problem.

response = driveservice.list(
q=”name=’June 2019′ and mimeType=’application/vnd.google-apps.folder'”,
driveId=’abcdef’,
corpora=’drive’,
includeItemsFromAllDrives=True,
supportsAllDrives=True
).execute()

for item in response.get(‘files’, []):
# process found item

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in