Duplicate File with Pattern: attending collisions automatically

Hi everyone,

I've been using a button to Dupe files, prepending them with a date stamp:

Copy DUPLICATE PATTERN *.* AS "{date|yyMMdd} *.*"

Sometimes I dupe the same file more than once in a day, so I tried adding an unattended directive in order to avoid the collision dialog:

Copy DUPLICATE PATTERN *.* AS "{date|yyMMdd} *.*" UNATTENDED=yes WHENEXISTS=rename

However, this still triggers a collision dialog!

  • Is this a bug?
  • If not, I can kind of sort it with renameold (not exactly what I want), or by writing a script. Is there another option?

In advance, thanks for any thoughts.

Try this:

Copy HERE AS="{date|yyMMdd} {file}" WHENEXISTS=rename

I was going to suggest using PATTERN to avoid using {file} in the target name:

Copy HERE PATTERN="*" AS="{date|yyMMdd} *" WHENEXISTS=rename

But, having tested it, I am not sure it makes a difference now, and lxp's command seems fine.

I think it used to make a difference, but I can't find a difference now in Opus 12.12. I think we changed the Copy command to expand things like {file} for each item, instead of just once before the command is run, so the two are equivalent now.

(I still have a slight preference for using PATTERN here, since it avoids having to know that Copy is special and won't turn into a single copy command per file like most commands would when {file} is used somewhere in its arguments. But the actual end results are the same, and Copy only gets run once, for the whole set of files at once.)

Now I am a bit confused... This was my first try:

Copy HERE AS="{date|yyMMdd} *.*" WHENEXISTS=rename

It works, but only once. Well, personally I'd simply add {time}.

Wow, thank you for all the options, guys!

That works wonders. Love it. Really appreciate the help. :slight_smile: