I am looking for a way to create a button that duplicates a file and then renames that file by replacing the year, month, and day parts.
So when this is the original file: Testfile - dd201005.txt
I would like to have a button that copies the file and renames the new file to: Testfile - dd211123.txt
The dd is a prefix, and the number is in yymmdd format.
When trying to create this, I first copied the file and then started with the rename window. I managed to trim the right part of the file and add the date code at the end. However, it seems I cannot get it to work all the way because the datestamp does not work. I have created a screencast where I show what I do and where things go wrong. Also, I show how the original preset does work.
Is there anyone who can help me to create a script that does the following:
- Duplicate a file (Testfile - dd201005.txt → Testfile - dd201005 - Copy.txt)
- Trim the final part of the file name; the date code and "- copy" should be removed (Testfile - dd201005 - Copy.txt → Testfile - dd.txt)
- Add the current date in the format yymmdd (Testfile - dd.txt → Testfile - dd211123.txt)
Any help or tips is appreciated!