1folderName = '###' # Please set the folder name.
2
3folders = drive.ListFile(
4 {'q': "title='" + folderName + "' and mimeType='application/vnd.google-apps.folder' and trashed=false"}).GetList()
5for folder in folders:
6 if folder['title'] == folderName:
7 file2 = drive.CreateFile({'parents': [{'id': folder['id']}]})
8 file2.SetContentFile('new_test.csv')
9 file2.Upload()
10