Make copy of selected file with auto date_time suffix?

Hi All,

Wondering if it's possible to make a button that copies a selected file into the same directory with the same filename but with a date/time suffix added on the end?

So, select "thisisafile.txt", click on the button, and now the directory would contain "thisisafile.txt" and "thisisafile_2007-05-17_17-31.txt"?

Would be handy for my 'make a copy before modifying a file' work process.

All the best,

pt

Best I can come up with is this:

Copy DUPLICATE AS "*_{date|yyyy-MM-dd}_{time|HH-mm-ss}"

That works but it puts the date/time after the file extension, which isn't ideal. I can't see a way to specify a "from" pattern for the Copy command (without making it ignore the file selection and copy all matching files, whether selected or not). Might need a feature request but I'll wait and see if it's already possible via something I haven't thought of.

Ken worked out a way to do this better:

@nofilenamequoting Copy DUPLICATE FILE="{file$}" AS="{file$|noext}_{date|yyyy-MM-dd}_{time|HH-mm-ss}{file$|ext}"