--suffix parameter

I am trying to set a suffix on the backup files by utilizing --suffix = date "+-%Y-%m-%d" on macOS where the remote is either Google and Onedrive. The problem is that rclone does not expand the suffix command, the suffix is set as the string above. If I paste the command in a terminal it expands to “-2018-12-28”… My question is:

  1. how to set the date string correct as --suffix parameter to get macOS to expand the suffix string as a date command…

I’m assuming you want the output to be something like this as you have to put single ` around the command you want to escape out and run.

textere@seraph:~  date "+-%Y-%m-%d"
textere@seraph:~ echo blah` date "+-%Y-%m-%d" `

I have tried that, does not work… I also put a space in between the hyphens…

prezi4.pdfdate "+-%Y-%m-%d"

is an example of a backed up file…

You need to put single backticks in the command as I shared in my output above.

So that would be:

textere@seraph:~ echo prezi4.pdf`date "+-%Y-%m-%d"`

Can you share specifically what your are typing and what the output is?

this worked now… thx…

/Users/thomas/bin/rclone sync /Users/thomas/test/source local:/Users/thomas/test/dest --dry-run --verbose --backup-dir=local:/Users/thomas/test/dest_backup --suffix=date "+-%Y-%m-%d"

I am utilizing the --suffix parameter in a Swift app (macOS app) and the arguments for the Process object in Swift does not expands shell commands. That caused the problem - and I have found a workaround by setting the date as suffix in the macos app when loading the app… not perfect, but i works…