Is it possible to do a Google Drive copy that recreates shortcuts?

What is the problem you are having with rclone?

I do not have a problem. This is a conceptual question regarding Google Drive and shortcuts.

Suppose I have a 500 GB file with shortcuts to that file in many locations. For example:

  • Root/ (actual file)
  • Root/Folder1/ (shortcut)
  • Root/Folder2/ (shortcut)
  • Root/Folder3/ (shortcut)

I want to (non-server-side) copy this Google Drive to another Google Drive. By default, the copy will read the pointed-to file contents and make four copies of instead of a single copy with three shortcuts. I know I can use --drive-skip-shortcuts, but this leaves me with a single in the drive root and nothing else.

Is there any way to do a copy that preserves the existing structure (i.e., one copy of with three shortcuts in the appropriate locations)?

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.1
- os/version: Microsoft Windows 10 Pro 21H2 (64 bit)
- os/kernel: 10.0.19044.1706 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.9
- go/linking: dynamic
- go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)


The rclone config contents with secrets removed.


A log from the command with the -vv flag


I see what you mean.

There isn't a way to do this at the moment.

You could use rclone lsjson to figure out the structure. Shortcuts have IDs which are the shortcut ID followed by the target ID with a tab between them, so a bit of scripting would work out what the shortcuts are in the source - you could then re-create them with rclone backend shortcut drive:

Thanks, I'll check out this approach. Do you think this is achievable as part of doing a copy at some point in the future and worth an enhancement request, or is it simply too complicated, like recreating sharing permissions?

I think a script to do it wouldn't be too complicated.

Building this into rclone would mean something like generalized symlink support which is a large project.

The main problem with that is that Google drive shortcuts are not like symlinks they don't contain a file path, they point to a file ID and it's hard to turn an id back into a path, and may be impossible if the id not under the root.

So I don't see this as part of rclone copy any time soon!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.