This release adds a new --json flag for inspecting Google Drive file and folder contents without downloading them.
Highlights
- New
--jsonflag lists the file or folder contents as a JSON array on stdout instead of downloading, so you can resolve filenames and IDs before fetching anything. It is in beta and its output format may change in a future release.
Features
-
Add a
--jsonflag that prints file or folder contents as a JSON array of{"url", "path"}entries instead of downloading. Paths use POSIX separators on all platforms, and the flag cannot be combined with-O/--output. (#460, #463)# Resolve a single file's name without downloading it filename=$(gdown "$url" --json | jq -r '.[0].path') # List every file in a folder gdown https://drive.google.com/drive/folders/FOLDER_ID --folder --json
-
Add a
skip_downloadparameter todownload()that resolves the target filename and ID without fetching the file, returning aGoogleDriveFileToDownload. (#463) -
--jsonnow prints a one-time beta warning to stderr, which--quietsuppresses. (#465)