How to migrate videos to Google Drive

and create list of urls to update in your LMS

I migrated my videos from Vimeo to Google drive.

I created all the screencasts using Screenflow. The source files were in directories according to course.

Steps

1. Use batch export in Screenflow to move your videos to your google drive folder

2. Load packages and get files on google directory

pacman::p_load(tidyverse, googledrive, glue)

drive_auth()

files_330a  <- drive_get("~/screencasts/330A")

3. List files in the google drive directory

drive_ls(files_330a)  %>%
  select(name, id)
## # A tibble: 73 x 2
##    name                           id                               
##    <chr>                          <chr>                            
##  1 cheating.mp4                   12tuS_s71ogS_EuRJW9vUPP3nKSICQnQ9
##  2 googlesheets_history.mp4       1B5R6Tzq_Dh_ECc46RKzTCtsqUqGljp1H
##  3 1-submit-links-googlesheet.mp4 1Lriqn-21N9cF-kenbbL7YhrrE_ajaQUp
##  4 1-fb-cashflow.mp4              1CEM51-KtFQu5G2pzKX-bEqcxc1-jGuCd
##  5 0-welcome-p2.mp4               1ASoRZlEbNxPMZpnTUQlncZF1JWTamyVV
##  6 0-welcome-p1.mp4               1eyxPjAujqzKolCzn5Cd_0-3jwJvUhccO
##  7 1-fin-stat-facebook.mp4        1DaFI_R-SjeNnVPtav6vuY1AfFy0vZB4X
##  8 1-concept.mp4                  1-7Vl4k0Ui0I5kwEIIgaYD4J5vGwIbEff
##  9 1-fb.mp4                       1HbdPlashijYJZ7b0aZhQWkOpYWLJdpRZ
## 10 5-standalone.mp4               1uktnpTi22ABr7lBEZu4hYmDOJXl7HyTA
## # … with 63 more rows

4. Change permissions of files in directory to Sonoma State

files_330a  %>% 
  drive_share(role = "reader", type = "domain", domain = "sonoma.edu")

5. Compile list of urls to upload to LMS

drive_ls(files_330a)  %>%
  select(name, id)  %>%
  mutate(url = glue("https://drive.google.com/file/d/{id}/view?usp=sharing"))  %>%
  arrange(name)  %>%
  select(name, url)  
## # A tibble: 73 x 2
##    name                url                                                      
##    <chr>               <glue>                                                   
##  1 0-asc-logon.mp4     https://drive.google.com/file/d/1qRRp3OyqNnY8uICmXYCwc5v…
##  2 0-welcome-p1.mp4    https://drive.google.com/file/d/1eyxPjAujqzKolCzn5Cd_0-3…
##  3 0-welcome-p2.mp4    https://drive.google.com/file/d/1ASoRZlEbNxPMZpnTUQlncZF…
##  4 1-concept.mp4       https://drive.google.com/file/d/1-7Vl4k0Ui0I5kwEIIgaYD4J…
##  5 1-fb-cashflow.mp4   https://drive.google.com/file/d/1CEM51-KtFQu5G2pzKX-bEqc…
##  6 1-fb.mp4            https://drive.google.com/file/d/1HbdPlashijYJZ7b0aZhQWkO…
##  7 1-fin-stat-amzn.mp4 https://drive.google.com/file/d/1-8JdUZFQWRPpAMBuvfiJND8…
##  8 1-fin-stat-bs.mp4   https://drive.google.com/file/d/1-9a7-56MQNOZxkEmGBaC1wd…
##  9 1-fin-stat-cf.mp4   https://drive.google.com/file/d/1-B7ZI3TOnEDFuCDgcaBGUsG…
## 10 1-fin-stat-faceboo… https://drive.google.com/file/d/1DaFI_R-SjeNnVPtav6vuY1A…
## # … with 63 more rows

6. Write output to a csv file

and perform tedious task of updating each link.

Elizabeth Stanny
Elizabeth Stanny
Professor of Business Administration

My research interests include climate change and political disclosures.