drive_cp_dir: Copy a Google Drive Folder

View source: R/drive_cp_dir.R

drive_cp_dirR Documentation

Copy a Google Drive Folder

Description

Copies all files (Google Workspace or otherwise) from one destination to another. This is a workaround for the absence of this functionality in the GDrive API. It's accomplished by recursive calls to googledrive::drive_cp().

Usage

drive_cp_dir(new_dir_name, source_dir, dest_dir, share_anyone = FALSE, ...)

Arguments

new_dir_name

What's the name of the new (cloned) directory?

source_dir

Source directory; must be a string path for drive_find_path() or a dribble, e.g. from googledrive::drive_find()

dest_dir

Destination directory; if not supplied, assumes same parent as source_dir (i.e. will be cloned side-by-side)

share_anyone

do you want copied files to be viewable by anyone with the link? Default=FALSE

...

Pass other parameters to googledrive::drive_cp()

Details

Throws an error if the new_dir_name already exists in dest_dir.

Value

Dribble of the cloned folder

See Also

Other Google Drive Functions: drive_contents(), drive_copy_missing_files(), drive_find_path(), drive_get_info(), drive_inSync(), drive_new_from_template(), drive_open(), init_lesson_meta(), update_teach_links()


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.