Copy and Rename Question

Hi everyone. I'm new to Directory Opus and I have a situation where I'd like to create a button that uses the copy function and checks to see if the same named file exists where it's being copied to. If it does exist I'd like the old file to be renamed with a date appended to the front of the file then the new file to be copied over.
This is similar in function to what the copy command already does when it asks if you want to rename the file. I just want to automate the process. I've figured out how to create a button that does the renaming part, but I can't get copy and rename to work together.

Does anyone know if this can be done in Directory Opus?

If you make a button which runs

Copy WHENEXISTS=renameold

then it will automatically rename existing files without prompting you. The renamed files will have "(original)" (with a number if they're the second such file) appended to their names. As far as I know there isn't a way to make the renamed files use a different naming format (e.g. a date).

If all the files are in one directory then you could use select all files in the source and then run Select SOURCETODEST so that any files with the same names in the destination are also selected. You could then run a rename button which renames those files to include the current date/time, and then do a normal copy of the new files. I suspect the files aren't all in the same directory, though, so this may not be that useful.

You could probably use the Synchronize tool to get a list of those files which need updating, and then select them and run the date-rename button instead of going ahead with the sync. Still takes a few steps, though.

If the dates are just a nice-to-have and automation is more important then I'd say go with the Copy WHENEXISTS=renameold method.

If you do want to rename files with the current date/time then this post might be helpful:

[Add the current date and time to a file's name)

Thank you for the information nudel. I was hoping to use a different naming format other than "(original)". Having the date appended is important because there are certain files I periodically update through the week but may need to revert back to a previous version. I've made a button to perform the rename with the current date so I can just run that before copying the files over. I was just hoping to condense the operation into a single button click.

Paste the code of your Rename and Copy buttons up here and let me take a stab at this one. I've been working with some similar copy commands lately and I have a couple ideas. But I need to see what you are doing first.