Odd Suffix Behavior - Team Drives

I’m using a backup folder for changed files, along with --suffix to rename and keep revisions.

I suspect this is something on google drive’s end, and not rclone’s but the behavior is weird and I’m hoping there is a workaround.

The suffix flag I’m using adds a decimal followed by the current date (format Month-Day-Year, eg. 03-06-2019 for today). However, depending on where I view the file from, the location of the suffix changes. On the Web UI, it appears after the file extension (results in the file showing up as an unknown binary file type). Using File Stream (Windows Explorer), it adds it before and leaves the extension intact.

The behavior in Windows Explorer is what I want, that way the file still opens properly without a manual rename.

Downloading the files through the Web UI result in the same naming that appears through File stream. For that reason I believe this is a bug on Google’s end.

The flags in question are:

–backup-dir Drive1:Altered --suffix .%date:~-10,2%-%date:~-7,2%-%date:~-4,4%

And here’s a screenshot of Filestream and the Web UI side by side for the same file.


It looks like Filestream/Web downloads is attempting to make the file be openable in exporer with an extension by shuffling the naming about. Odd but I guess understandable.

So if --suffix had the ability to preserve the extension - that sounds like what you want?

So let’s say we added a new flag --suffix-preserve-extension say then your files would be

  • original.isl
  • original.03-05-2019.isl

Is that what you were thinking of?

Another idea would be don’t use --suffix, but put the date in the --backup-dir

A preserve extension option would be preferred in my case. If I put it in the backup directory name it lets me sort by archived date easily, but looking for a specific file means I need to browse/search through each date till I find it with no way to tell if it’s even there till I find it.

Do you want to please make a new issue on github about that, then link it here?


1 Like

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