ebooksFolder="title = '%s' and 'root' in parents and mimeType = 'application/vnd.google-apps.folder' and trashed = false"%config.config_google_drive_folder
folder="title = '%s' and '%s' in parents and mimeType = 'application/vnd.google-apps.folder' and trashed = false"%(folderName.replace("'","\\'"),parentId)
fileList=drive.ListFile({'q':folder}).GetList()
returnfileList[0]
defgetFile(pathId,fileName,drive=None):
ifnotdrive:
drive=getDrive()
ifdrive.auth.access_token_expired:
drive.auth.Refresh()
metaDataFile="'%s' in parents and trashed = false and title = '%s'"%(pathId,fileName.replace("'","\\'"))