bygoogleworkspace· 58 skills
List and download all files from a Google Drive folder.
$npx -y skills add googleworkspace/cli --skill recipe-bulk-download-folderInstalls into the current project.
Run `npx skills use "https://github.com/googleworkspace/cli" --skill "googleworkspace/cli/recipe-bulk-download-folder"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/googleworkspace/cli" that are relevant to the current task. Run `npx skills add "https://github.com/googleworkspace/cli"` and select the relevant skills, then follow their instructions.
| 1 | # Bulk Download Drive Folder |
| 2 | |
| 3 | > **PREREQUISITE:** Load the following skills to execute this recipe: `gws-drive` |
| 4 | |
| 5 | List and download all files from a Google Drive folder. |
| 6 | |
| 7 | ## Steps |
| 8 | |
| 9 | 1. List files in folder: `gws drive files list --params '{"q": "'\''FOLDER_ID'\'' in parents"}' --format json` |
| 10 | 2. Download each file: `gws drive files get --params '{"fileId": "FILE_ID", "alt": "media"}' -o filename.ext` |
| 11 | 3. Export Google Docs as PDF: `gws drive files export --params '{"fileId": "FILE_ID", "mimeType": "application/pdf"}' -o document.pdf` |