如何从 google 驱动器文件夹中随机下载多个文件

How to randomly download many files from a google drive folder

我看了这个问题的答案Download file from Google Drive to local folder from Google Apps Script

以上问题的答案只给出了下载单个文件或文件夹的说明,但我想从文件夹中下载一小部分(比如 50 个)随机文件,有什么办法可以通过编程方式实现吗?

我建议从 file.list to return the first 100 files on your google drive account, you can then loop through them and download each of them one at a time. The file.list method has an option called q 开始,这样您就可以仅搜索目录中使用父项的文件。

是的,所有这些都可以通过编程方式完成