Replace Text With A TimeStamp - Make A macOS Service W/ AppleScript
I borrowed some work from this guy's page . This short, simple script: do shell script "date +%Y-%m-%d\\ %H:%M:%S\\ %z" will replace whatever text you highlight, with this: 2017-09-13 15:27:41 -700 (That's just an example, of course) I don't want the " 20 " from " 2017 " so I'll change the %Y to %y I don't want dashes I don't want colons I don't want spaces I don't want seconds I don't want zone My script ends up like this: do shell script "date +%y%m%d%H%M" and my replacement output is now: 1709131527 (Optionally, I've created an additional service that includes the seconds, useful for rapid renaming of multiple photos or other files I like to store chronologically/sequentially.) Assign a keyboard shortcut by turning it into a Service in Automator. Open Automator.app Create a New > Service Set it to receive selected text in any application Check the Output replaces...