Open jonthegeek opened 8 months ago
I think you are looking for purrr pkg.
A combination of the googledrive
and purrr
packages should do the trick:
dest_folder <- here::here("data", "drive") |> fs::dir_create()
drive_find(pattern = ".*.docx", type = drive_mime_type("docx")) |>
pwalk(\(name, id, drive_resource) drive_download(as_id(id), path = here(dest_folder, name), overwrite = TRUE))
thank you i will play around with this
Hi all, I have 2 questions i could use some help with. The first one is how do I go about reading from a google drive that has multiple layers of nested folders. I want a script that looks at all the folders/subfolders and downloads all the .docx files that follow a certain name format. Is there a package that can iterate through folders/subfolders on a google drive?