title: Trying to move a Google drive file with googledrive package results in 403 error "A shared drive item must have exactly one parent."
body: <p>I want to move a file on a shared Google drive into a sub folder, but always getting an error.</p>
  <p>Let's say I have folder x and sub_folder x/_old on a shared gdrive.</p>
  <p>In folder x I have an abc.png image that I want to move to the x/_old folder.</p>
  <p>I first retrieve the file id of that png file as well as the file/folder id of the _old folder:</p>
  <pre><code>library(googledrive)
  library(tidyverse)
  folder_id &lt;- drive_ls(path = &quot;MY_GDRIVE_PATH&quot;) |&gt;
    filter(name == &quot;x&quot;) |&gt; 
    pull(id)
  
  old_id &lt;- drive_ls(path = folder_id, type = &quot;folder&quot;) |&gt;
    filter(name == &quot;_old&quot;) |&gt; 
    pull(id)
  
  image_id &lt;- drive_ls(path = folder_id) |&gt; 
    filter(str_detect(name, &quot;abc.png&quot;)) |&gt; 
    pull(id)
  
  drive_mv(file = image_id,
           path = old_id,
           overwrite = TRUE)
  </code></pre>
  <p>And I'm getting this error:</p>
  <pre><code>Error in `gargle_abort_request_failed()`:
  ! Client error: (403) Forbidden
  A shared drive item must have exactly one parent.
  • domain: global
  • reason: teamDrivesParentLimit
  • message: A shared drive item must have exactly one parent.
  </code></pre>
  <p>Any idea what's going on?</p>
  <p>UPDATE:</p>
  <p>A workaround by a) copying the file to the _old folder with <code>drive_cp</code> and then removing the original with <code>drive_trash</code> works, which makes me wonder if the <code>drive_mv</code> is a bit too picky here.</p>