Date parts in File name - Concatenate Date String?

I am trying to automate downloading my bank, credit card, etc., statements. The filenames download with date parts. One comes down as:

Statement_May 2015

Of course, next month it will be Statement_June 2015

I tried downloading the file called: Statement_%ICUDateTime%yyyyy MM%, but it treated the %ICUDateTime%yyyy MM% as a literal string.

I was thinking of using a variable, and know how to set it to what I want, but I can’t figure out how to use that variable for the downloaded filename or the target filename.

I also found 1 Workflow example that added a date part to a filename, but it started with an absolute name. I need to add the date part to the file I fill download and the new filename. (I change the filename slightly when I download it)

Can we concatenate date onto a string, like “Statement” to build up what I want?

Use Set variable to Text. to create the textstring you want..

Sometimes in Keyboard Maestro, you need %Variable% in front of a variable and sometimes you do not. If you can use the Insert token drop down when it is there, it helps get it right.

Hey Stuart,

There's a fair amount of stuff on the board about that sort of thing.

Here's one such thread.


Got it. Thanks!

Stuart by all means join the thread. I just got back to working on this again. Hopefully we can get some great code for others to benefit. Chris also added an AppleScript which I am sure you have seen by now.