Default name on duplicate

How can I enter a default name for duplicate based on the original filename in rename dialogue?

For example "MyOriginal.txt" is duplicated to "MyOriginal.txt.bak", where .bak is the preset I don't wnat to enter everytime.

Thanks and have a nice XMas :slight_smile:

Not sure there's a great way to do this. We don't have access to anything scriptable AFTER a copy operation is begun other than the progress dialog you could display if wrote a script to proxy your copy operations through. I think the best you might be able to achieve is to have such a custom progress dialog try and provide access to the current filename being copied so that you could set the clipboard to that name + the .bak extension you want. But that's a LOT of script work JUST to get a filename string into the clipboard that you'd still have to paste manually into the standard file conflict dialog...

Funny though man, I'd been wondering recently if we could use a OnCopy and OnCopyConflict event notifications so we can intercept copy operations and then do interesting things that are outside the scope of Opus' current options. The thought came recently when another user posted an idea about having alternative options for handling file conflicts... launching diff tools against them, showing md5 hashes for the conflicting files, etc.

I'd much rather GPSoft consider implementing events for these operations so that we can get crazy with customizing things here, than have them spend time coding specific asks in this space - especially since there will be differing opinions as with many things involving dialogs...

For instance, we could get CopyData and CopyConflictData objects passed to such events - with special dialog controls and interrupts into the copy operation that could let us access and modify information like:

  • old name and new name (based on a series of copy options derived from both prefs and whatever copy action called the current copy)
  • source/destination
  • totals involved in the operation (total items, files, folders, size info if calculated, remaining items as of whatever item has been processed so far)
  • conflict handling information (again, derived from both prefs and whatever copy action called the current copy - here's where code could be added to handle your request)
  • queuing information (oppty to devise smarter specific queue handling based on physical device, bi-directional awareness, automatic handling of same drive 'moves' not needing to be queued since it's a fast NON-fragmenting operation, helper prompts to dynamically offer queuing options to adjust things)
  • buffer settings for operation (oppty to modify buffer settings on the fly to see if it changes result)

The key to this being super useful in my opinion is the oppty to change various characteristics of how the copy operation is being performed on the fly. With a carefully crafted dialog with progress info that could modify options while the operation is running, you could even have certain options be things you could change on the fly that normally need to be static decisions made up front reflected in the options and args used in a static copy command.

I would use this myself, and would happily write a copy handler with whiz-bang custom conflict dialog options that we've talked about recently...

Thanks for the statement.

Is there an option to add a suffix like ".bak" to the filename in "copy duplicate"? If so, I alternatively could create some preset-buttons.

Not that I knew of... I've tried finding a prefs option I could have sworn existed that influenced the auto generated name in certain conflict situations. But I can't find it.

I think you'll have to do something like this with basic commands:

clipboard set={o}.bak copy here whenexists=ask